Selaa lähdekoodia

Update libkv godeps

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Jana Radhakrishnan 9 vuotta sitten
vanhempi
commit
c42e2cf44d
100 muutettua tiedostoa jossa 47338 lisäystä ja 2991 poistoa
  1. 23 5
      libnetwork/Godeps/Godeps.json
  2. 94 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md
  3. 235 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go
  4. 297 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go
  5. 20 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go
  6. 17 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go
  7. 514 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go
  8. 896 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go
  9. 33 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go
  10. 70 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go
  11. 21 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go
  12. 71 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go
  13. 41 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go
  14. 42 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go
  15. 891 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go
  16. 644 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go
  17. 73 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go
  18. 1407 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go
  19. 272 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go
  20. 522 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go
  21. 65 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go
  22. 102 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go
  23. 29 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go
  24. 38 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go
  25. 41 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go
  26. 95 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go
  27. 178 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go
  28. 186 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go
  29. 22 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go
  30. 30 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go
  31. 74 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go
  32. 169 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go
  33. 75 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go
  34. 69 0
      libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go
  35. 0 23
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/add_child.go
  36. 0 73
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/add_child_test.go
  37. 0 481
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/client.go
  38. 0 108
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/client_test.go
  39. 0 37
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/cluster.go
  40. 0 34
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_delete.go
  41. 0 46
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_delete_test.go
  42. 0 36
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_swap.go
  43. 0 57
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_swap_test.go
  44. 0 55
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/debug.go
  45. 0 28
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/debug_test.go
  46. 0 40
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/delete.go
  47. 0 81
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/delete_test.go
  48. 0 49
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/error.go
  49. 0 32
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/get.go
  50. 0 131
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/get_test.go
  51. 0 30
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/member.go
  52. 0 71
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/member_test.go
  53. 0 72
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/options.go
  54. 0 403
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/requests.go
  55. 0 22
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/requests_test.go
  56. 0 89
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/response.go
  57. 0 42
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_curl_chan_test.go
  58. 0 137
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_update_create.go
  59. 0 241
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_update_create_test.go
  60. 0 6
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/version.go
  61. 0 103
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/watch.go
  62. 0 119
      libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/watch_test.go
  63. 1 1
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/.travis.yml
  64. 50 71
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/README.md
  65. 82 0
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/docs/compatibility.md
  66. 157 0
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/docs/examples.md
  67. 1 62
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/libkv.go
  68. 1 1
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/script/travis_etcd.sh
  69. 3 5
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/boltdb/boltdb.go
  70. 20 9
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/consul/consul.go
  71. 210 179
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/etcd/etcd.go
  72. 7 6
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/store.go
  73. 1 1
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/zookeeper/zookeeper.go
  74. 17 5
      libnetwork/Godeps/_workspace/src/github.com/docker/libkv/testutils/utils.go
  75. 150 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go
  76. 148 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md
  77. 901 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go
  78. 566 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go
  79. 205 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go
  80. 1117 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go
  81. 36 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md
  82. 271 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go
  83. 3 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go
  84. 22 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go
  85. 1552 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go
  86. 1232 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go
  87. 28307 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go
  88. 442 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl
  89. 80 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl
  90. 46 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl
  91. 102 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go
  92. 250 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl
  93. 139 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go
  94. 1728 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go
  95. 846 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go
  96. 151 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go
  97. 20 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go
  98. 155 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go
  99. 39 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go
  100. 924 0
      libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go

+ 23 - 5
libnetwork/Godeps/Godeps.json

@@ -1,6 +1,6 @@
 {
 {
 	"ImportPath": "github.com/docker/libnetwork",
 	"ImportPath": "github.com/docker/libnetwork",
-	"GoVersion": "go1.4.1",
+	"GoVersion": "go1.4.2",
 	"Packages": [
 	"Packages": [
 		"./..."
 		"./..."
 	],
 	],
@@ -30,9 +30,19 @@
 			"Rev": "a65b733b303f0055f8d324d805f393cd3e7a7904"
 			"Rev": "a65b733b303f0055f8d324d805f393cd3e7a7904"
 		},
 		},
 		{
 		{
-			"ImportPath": "github.com/coreos/go-etcd/etcd",
-			"Comment": "v2.0.0-7-g73a8ef7",
-			"Rev": "73a8ef737e8ea002281a28b4cb92a1de121ad4c6"
+			"ImportPath": "github.com/coreos/etcd/client",
+			"Comment": "v2.2.0",
+			"Rev": "e4561dd8cfb1163fb51afceca9c78aa89398e731"
+		},
+		{
+			"ImportPath": "github.com/coreos/etcd/pkg/pathutil",
+			"Comment": "v2.2.0",
+			"Rev": "e4561dd8cfb1163fb51afceca9c78aa89398e731"
+		},
+		{
+			"ImportPath": "github.com/coreos/etcd/pkg/types",
+			"Comment": "v2.2.0",
+			"Rev": "e4561dd8cfb1163fb51afceca9c78aa89398e731"
 		},
 		},
 		{
 		{
 			"ImportPath": "github.com/coreos/go-systemd/dbus",
 			"ImportPath": "github.com/coreos/go-systemd/dbus",
@@ -146,7 +156,7 @@
 		},
 		},
 		{
 		{
 			"ImportPath": "github.com/docker/libkv",
 			"ImportPath": "github.com/docker/libkv",
-			"Rev": "4ca160cf21d4e097725d93a72d7b3937c537cdc2"
+			"Rev": "749af6c5b3fb755bec1738cc5e0d3a6f1574d730"
 		},
 		},
 		{
 		{
 			"ImportPath": "github.com/godbus/dbus",
 			"ImportPath": "github.com/godbus/dbus",
@@ -200,6 +210,10 @@
 			"ImportPath": "github.com/syndtr/gocapability/capability",
 			"ImportPath": "github.com/syndtr/gocapability/capability",
 			"Rev": "e55e5833692b49e49a0073ad5baf7803f21bebf4"
 			"Rev": "e55e5833692b49e49a0073ad5baf7803f21bebf4"
 		},
 		},
+		{
+			"ImportPath": "github.com/ugorji/go/codec",
+			"Rev": "5abd4e96a45c386928ed2ca2a7ef63e2533e18ec"
+		},
 		{
 		{
 			"ImportPath": "github.com/vishvananda/netlink",
 			"ImportPath": "github.com/vishvananda/netlink",
 			"Rev": "4b5dce31de6d42af5bb9811c6d265472199e0fec"
 			"Rev": "4b5dce31de6d42af5bb9811c6d265472199e0fec"
@@ -207,6 +221,10 @@
 		{
 		{
 			"ImportPath": "github.com/vishvananda/netns",
 			"ImportPath": "github.com/vishvananda/netns",
 			"Rev": "493029407eeb434d0c2d44e02ea072ff2488d322"
 			"Rev": "493029407eeb434d0c2d44e02ea072ff2488d322"
+		},
+		{
+			"ImportPath": "golang.org/x/net/context",
+			"Rev": "9dd48c277bcb2bb2cc3eb6a6368a486a567d3562"
 		}
 		}
 	]
 	]
 }
 }

+ 94 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md

@@ -0,0 +1,94 @@
+# etcd/client
+
+etcd/client is the Go client library for etcd.
+
+[![GoDoc](https://godoc.org/github.com/coreos/etcd/client?status.png)](https://godoc.org/github.com/coreos/etcd/client)
+
+## Install
+
+```bash
+go get github.com/coreos/etcd/client
+```
+
+## Usage
+
+```go
+package main
+
+import (
+	"log"
+	"time"
+
+	"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
+	"github.com/coreos/etcd/client"
+)
+
+func main() {
+	cfg := client.Config{
+		Endpoints:               []string{"http://127.0.0.1:2379"},
+		Transport:               client.DefaultTransport,
+		// set timeout per request to fail fast when the target endpoint is unavailable
+		HeaderTimeoutPerRequest: time.Second,
+	}
+	c, err := client.New(cfg)
+	if err != nil {
+		log.Fatal(err)
+	}
+	kapi := client.NewKeysAPI(c)
+	resp, err := kapi.Set(context.Background(), "foo", "bar", nil)
+	if err != nil {
+		log.Fatal(err)
+	}
+}
+```
+
+## Error Handling
+
+etcd client might return three types of errors.
+
+- context error
+
+Each API call has its first parameter as `context`. A context can be canceled or have an attached deadline. If the context is canceled or reaches its deadline, the responding context error will be returned no matter what internal errors the API call has already encountered.
+
+- cluster error
+
+Each API call tries to send request to the cluster endpoints one by one until it successfully gets a response. If a requests to an endpoint fails, due to exceeding per request timeout or connection issues, the error will be added into a list of errors. If all possible endpoints fail, a cluster error that includes all encountered errors will be returned.
+
+- response error
+
+If the response gets from the cluster is invalid, a plain string error will be returned. For example, it might be a invalid JSON error.
+
+Here is the example code to handle client errors:
+
+```go
+cfg := client.Config{Endpoints: []string{"http://etcd1:2379,http://etcd2:2379,http://etcd3:2379"}}
+c, err := client.New(cfg)
+if err != nil {
+	log.Fatal(err)
+}
+
+kapi := client.NewKeysAPI(c)
+resp, err := kapi.Set(ctx, "test", "bar", nil)
+if err != nil {
+	if err == context.Canceled {
+		// ctx is canceled by another routine
+	} else if err == context.DeadlineExceeded {
+		// ctx is attached with a deadline and it exceeded
+	} else if cerr, ok := err.(*client.ClusterError); ok {
+		// process (cerr.Errors)
+	} else {
+		// bad cluster endpoints, which are not etcd servers
+	}
+}
+```
+
+
+## Caveat
+
+1. etcd/client prefers to use the same endpoint as long as the endpoint continues to work well. This saves socket resources, and improves efficiency for both client and server side. This preference doesn't remove consistency from the data consumed by the client because data replicated to each etcd member has already passed through the consensus process.
+
+2. etcd/client does round-robin rotation on other available endpoints if the preferred endpoint isn't functioning properly. For example, if the member that etcd/client connects to is hard killed, etcd/client will fail on the first attempt with the killed member, and succeed on the second attempt with another member. If it fails to talk to all available endpoints, it will return all errors happened.
+
+3. Default etcd/client cannot handle the case that the remote server is SIGSTOPed now. TCP keepalive mechanism doesn't help in this scenario because operating system may still send TCP keep-alive packets. Over time we'd like to improve this functionality, but solving this issue isn't high priority because a real-life case in which a server is stopped, but the connection is kept alive, hasn't been brought to our attention.
+
+4. etcd/client cannot detect whether the member in use is healthy when doing read requests. If the member is isolated from the cluster, etcd/client may retrieve outdated data. As a workaround, users could monitor experimental /health endpoint for member healthy information. We are improving it at [#3265](https://github.com/coreos/etcd/issues/3265).

+ 235 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go

@@ -0,0 +1,235 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"bytes"
+	"encoding/json"
+	"net/http"
+	"net/url"
+
+	"golang.org/x/net/context"
+)
+
+type Role struct {
+	Role        string       `json:"role"`
+	Permissions Permissions  `json:"permissions"`
+	Grant       *Permissions `json:"grant,omitempty"`
+	Revoke      *Permissions `json:"revoke,omitempty"`
+}
+
+type Permissions struct {
+	KV rwPermission `json:"kv"`
+}
+
+type rwPermission struct {
+	Read  []string `json:"read"`
+	Write []string `json:"write"`
+}
+
+type PermissionType int
+
+const (
+	ReadPermission PermissionType = iota
+	WritePermission
+	ReadWritePermission
+)
+
+// NewAuthRoleAPI constructs a new AuthRoleAPI that uses HTTP to
+// interact with etcd's role creation and modification features.
+func NewAuthRoleAPI(c Client) AuthRoleAPI {
+	return &httpAuthRoleAPI{
+		client: c,
+	}
+}
+
+type AuthRoleAPI interface {
+	// Add a role.
+	AddRole(ctx context.Context, role string) error
+
+	// Remove a role.
+	RemoveRole(ctx context.Context, role string) error
+
+	// Get role details.
+	GetRole(ctx context.Context, role string) (*Role, error)
+
+	// Grant a role some permission prefixes for the KV store.
+	GrantRoleKV(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error)
+
+	// Revoke some some permission prefixes for a role on the KV store.
+	RevokeRoleKV(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error)
+
+	// List roles.
+	ListRoles(ctx context.Context) ([]string, error)
+}
+
+type httpAuthRoleAPI struct {
+	client httpClient
+}
+
+type authRoleAPIAction struct {
+	verb string
+	name string
+	role *Role
+}
+
+type authRoleAPIList struct{}
+
+func (list *authRoleAPIList) HTTPRequest(ep url.URL) *http.Request {
+	u := v2AuthURL(ep, "roles", "")
+	req, _ := http.NewRequest("GET", u.String(), nil)
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+func (l *authRoleAPIAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2AuthURL(ep, "roles", l.name)
+	if l.role == nil {
+		req, _ := http.NewRequest(l.verb, u.String(), nil)
+		return req
+	}
+	b, err := json.Marshal(l.role)
+	if err != nil {
+		panic(err)
+	}
+	body := bytes.NewReader(b)
+	req, _ := http.NewRequest(l.verb, u.String(), body)
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+func (r *httpAuthRoleAPI) ListRoles(ctx context.Context) ([]string, error) {
+	resp, body, err := r.client.Do(ctx, &authRoleAPIList{})
+	if err != nil {
+		return nil, err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil {
+		return nil, err
+	}
+	var userList struct {
+		Roles []string `json:"roles"`
+	}
+	err = json.Unmarshal(body, &userList)
+	if err != nil {
+		return nil, err
+	}
+	return userList.Roles, nil
+}
+
+func (r *httpAuthRoleAPI) AddRole(ctx context.Context, rolename string) error {
+	role := &Role{
+		Role: rolename,
+	}
+	return r.addRemoveRole(ctx, &authRoleAPIAction{
+		verb: "PUT",
+		name: rolename,
+		role: role,
+	})
+}
+
+func (r *httpAuthRoleAPI) RemoveRole(ctx context.Context, rolename string) error {
+	return r.addRemoveRole(ctx, &authRoleAPIAction{
+		verb: "DELETE",
+		name: rolename,
+	})
+}
+
+func (r *httpAuthRoleAPI) addRemoveRole(ctx context.Context, req *authRoleAPIAction) error {
+	resp, body, err := r.client.Do(ctx, req)
+	if err != nil {
+		return err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return err
+		}
+		return sec
+	}
+	return nil
+}
+
+func (r *httpAuthRoleAPI) GetRole(ctx context.Context, rolename string) (*Role, error) {
+	return r.modRole(ctx, &authRoleAPIAction{
+		verb: "GET",
+		name: rolename,
+	})
+}
+
+func buildRWPermission(prefixes []string, permType PermissionType) rwPermission {
+	var out rwPermission
+	switch permType {
+	case ReadPermission:
+		out.Read = prefixes
+	case WritePermission:
+		out.Write = prefixes
+	case ReadWritePermission:
+		out.Read = prefixes
+		out.Write = prefixes
+	}
+	return out
+}
+
+func (r *httpAuthRoleAPI) GrantRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) {
+	rwp := buildRWPermission(prefixes, permType)
+	role := &Role{
+		Role: rolename,
+		Grant: &Permissions{
+			KV: rwp,
+		},
+	}
+	return r.modRole(ctx, &authRoleAPIAction{
+		verb: "PUT",
+		name: rolename,
+		role: role,
+	})
+}
+
+func (r *httpAuthRoleAPI) RevokeRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) {
+	rwp := buildRWPermission(prefixes, permType)
+	role := &Role{
+		Role: rolename,
+		Revoke: &Permissions{
+			KV: rwp,
+		},
+	}
+	return r.modRole(ctx, &authRoleAPIAction{
+		verb: "PUT",
+		name: rolename,
+		role: role,
+	})
+}
+
+func (r *httpAuthRoleAPI) modRole(ctx context.Context, req *authRoleAPIAction) (*Role, error) {
+	resp, body, err := r.client.Do(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return nil, err
+		}
+		return nil, sec
+	}
+	var role Role
+	err = json.Unmarshal(body, &role)
+	if err != nil {
+		return nil, err
+	}
+	return &role, nil
+}

+ 297 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go

@@ -0,0 +1,297 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"bytes"
+	"encoding/json"
+	"net/http"
+	"net/url"
+	"path"
+
+	"golang.org/x/net/context"
+)
+
+var (
+	defaultV2AuthPrefix = "/v2/auth"
+)
+
+type User struct {
+	User     string   `json:"user"`
+	Password string   `json:"password,omitempty"`
+	Roles    []string `json:"roles"`
+	Grant    []string `json:"grant,omitempty"`
+	Revoke   []string `json:"revoke,omitempty"`
+}
+
+func v2AuthURL(ep url.URL, action string, name string) *url.URL {
+	if name != "" {
+		ep.Path = path.Join(ep.Path, defaultV2AuthPrefix, action, name)
+		return &ep
+	}
+	ep.Path = path.Join(ep.Path, defaultV2AuthPrefix, action)
+	return &ep
+}
+
+// NewAuthAPI constructs a new AuthAPI that uses HTTP to
+// interact with etcd's general auth features.
+func NewAuthAPI(c Client) AuthAPI {
+	return &httpAuthAPI{
+		client: c,
+	}
+}
+
+type AuthAPI interface {
+	// Enable auth.
+	Enable(ctx context.Context) error
+
+	// Disable auth.
+	Disable(ctx context.Context) error
+}
+
+type httpAuthAPI struct {
+	client httpClient
+}
+
+func (s *httpAuthAPI) Enable(ctx context.Context) error {
+	return s.enableDisable(ctx, &authAPIAction{"PUT"})
+}
+
+func (s *httpAuthAPI) Disable(ctx context.Context) error {
+	return s.enableDisable(ctx, &authAPIAction{"DELETE"})
+}
+
+func (s *httpAuthAPI) enableDisable(ctx context.Context, req httpAction) error {
+	resp, body, err := s.client.Do(ctx, req)
+	if err != nil {
+		return err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return err
+		}
+		return sec
+	}
+	return nil
+}
+
+type authAPIAction struct {
+	verb string
+}
+
+func (l *authAPIAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2AuthURL(ep, "enable", "")
+	req, _ := http.NewRequest(l.verb, u.String(), nil)
+	return req
+}
+
+type authError struct {
+	Message string `json:"message"`
+	Code    int    `json:"-"`
+}
+
+func (e authError) Error() string {
+	return e.Message
+}
+
+// NewAuthUserAPI constructs a new AuthUserAPI that uses HTTP to
+// interact with etcd's user creation and modification features.
+func NewAuthUserAPI(c Client) AuthUserAPI {
+	return &httpAuthUserAPI{
+		client: c,
+	}
+}
+
+type AuthUserAPI interface {
+	// Add a user.
+	AddUser(ctx context.Context, username string, password string) error
+
+	// Remove a user.
+	RemoveUser(ctx context.Context, username string) error
+
+	// Get user details.
+	GetUser(ctx context.Context, username string) (*User, error)
+
+	// Grant a user some permission roles.
+	GrantUser(ctx context.Context, username string, roles []string) (*User, error)
+
+	// Revoke some permission roles from a user.
+	RevokeUser(ctx context.Context, username string, roles []string) (*User, error)
+
+	// Change the user's password.
+	ChangePassword(ctx context.Context, username string, password string) (*User, error)
+
+	// List users.
+	ListUsers(ctx context.Context) ([]string, error)
+}
+
+type httpAuthUserAPI struct {
+	client httpClient
+}
+
+type authUserAPIAction struct {
+	verb     string
+	username string
+	user     *User
+}
+
+type authUserAPIList struct{}
+
+func (list *authUserAPIList) HTTPRequest(ep url.URL) *http.Request {
+	u := v2AuthURL(ep, "users", "")
+	req, _ := http.NewRequest("GET", u.String(), nil)
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+func (l *authUserAPIAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2AuthURL(ep, "users", l.username)
+	if l.user == nil {
+		req, _ := http.NewRequest(l.verb, u.String(), nil)
+		return req
+	}
+	b, err := json.Marshal(l.user)
+	if err != nil {
+		panic(err)
+	}
+	body := bytes.NewReader(b)
+	req, _ := http.NewRequest(l.verb, u.String(), body)
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+func (u *httpAuthUserAPI) ListUsers(ctx context.Context) ([]string, error) {
+	resp, body, err := u.client.Do(ctx, &authUserAPIList{})
+	if err != nil {
+		return nil, err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return nil, err
+		}
+		return nil, sec
+	}
+	var userList struct {
+		Users []string `json:"users"`
+	}
+	err = json.Unmarshal(body, &userList)
+	if err != nil {
+		return nil, err
+	}
+	return userList.Users, nil
+}
+
+func (u *httpAuthUserAPI) AddUser(ctx context.Context, username string, password string) error {
+	user := &User{
+		User:     username,
+		Password: password,
+	}
+	return u.addRemoveUser(ctx, &authUserAPIAction{
+		verb:     "PUT",
+		username: username,
+		user:     user,
+	})
+}
+
+func (u *httpAuthUserAPI) RemoveUser(ctx context.Context, username string) error {
+	return u.addRemoveUser(ctx, &authUserAPIAction{
+		verb:     "DELETE",
+		username: username,
+	})
+}
+
+func (u *httpAuthUserAPI) addRemoveUser(ctx context.Context, req *authUserAPIAction) error {
+	resp, body, err := u.client.Do(ctx, req)
+	if err != nil {
+		return err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return err
+		}
+		return sec
+	}
+	return nil
+}
+
+func (u *httpAuthUserAPI) GetUser(ctx context.Context, username string) (*User, error) {
+	return u.modUser(ctx, &authUserAPIAction{
+		verb:     "GET",
+		username: username,
+	})
+}
+
+func (u *httpAuthUserAPI) GrantUser(ctx context.Context, username string, roles []string) (*User, error) {
+	user := &User{
+		User:  username,
+		Grant: roles,
+	}
+	return u.modUser(ctx, &authUserAPIAction{
+		verb:     "PUT",
+		username: username,
+		user:     user,
+	})
+}
+
+func (u *httpAuthUserAPI) RevokeUser(ctx context.Context, username string, roles []string) (*User, error) {
+	user := &User{
+		User:   username,
+		Revoke: roles,
+	}
+	return u.modUser(ctx, &authUserAPIAction{
+		verb:     "PUT",
+		username: username,
+		user:     user,
+	})
+}
+
+func (u *httpAuthUserAPI) ChangePassword(ctx context.Context, username string, password string) (*User, error) {
+	user := &User{
+		User:     username,
+		Password: password,
+	}
+	return u.modUser(ctx, &authUserAPIAction{
+		verb:     "PUT",
+		username: username,
+		user:     user,
+	})
+}
+
+func (u *httpAuthUserAPI) modUser(ctx context.Context, req *authUserAPIAction) (*User, error) {
+	resp, body, err := u.client.Do(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil {
+		var sec authError
+		err := json.Unmarshal(body, &sec)
+		if err != nil {
+			return nil, err
+		}
+		return nil, sec
+	}
+	var user User
+	err = json.Unmarshal(body, &user)
+	if err != nil {
+		return nil, err
+	}
+	return &user, nil
+}

+ 20 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go

@@ -0,0 +1,20 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// borrowed from golang/net/context/ctxhttp/cancelreq.go
+
+// +build go1.5
+
+package client
+
+import "net/http"
+
+func requestCanceler(tr CancelableTransport, req *http.Request) func() {
+	ch := make(chan struct{})
+	req.Cancel = ch
+
+	return func() {
+		close(ch)
+	}
+}

+ 17 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go

@@ -0,0 +1,17 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// borrowed from golang/net/context/ctxhttp/cancelreq_go14.go
+
+// +build !go1.5
+
+package client
+
+import "net/http"
+
+func requestCanceler(tr CancelableTransport, req *http.Request) func() {
+	return func() {
+		tr.CancelRequest(req)
+	}
+}

+ 514 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go

@@ -0,0 +1,514 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"errors"
+	"fmt"
+	"io/ioutil"
+	"math/rand"
+	"net"
+	"net/http"
+	"net/url"
+	"reflect"
+	"sort"
+	"sync"
+	"time"
+
+	"golang.org/x/net/context"
+)
+
+var (
+	ErrNoEndpoints           = errors.New("client: no endpoints available")
+	ErrTooManyRedirects      = errors.New("client: too many redirects")
+	ErrClusterUnavailable    = errors.New("client: etcd cluster is unavailable or misconfigured")
+	errTooManyRedirectChecks = errors.New("client: too many redirect checks")
+)
+
+var DefaultRequestTimeout = 5 * time.Second
+
+var DefaultTransport CancelableTransport = &http.Transport{
+	Proxy: http.ProxyFromEnvironment,
+	Dial: (&net.Dialer{
+		Timeout:   30 * time.Second,
+		KeepAlive: 30 * time.Second,
+	}).Dial,
+	TLSHandshakeTimeout: 10 * time.Second,
+}
+
+type Config struct {
+	// Endpoints defines a set of URLs (schemes, hosts and ports only)
+	// that can be used to communicate with a logical etcd cluster. For
+	// example, a three-node cluster could be provided like so:
+	//
+	// 	Endpoints: []string{
+	//		"http://node1.example.com:2379",
+	//		"http://node2.example.com:2379",
+	//		"http://node3.example.com:2379",
+	//	}
+	//
+	// If multiple endpoints are provided, the Client will attempt to
+	// use them all in the event that one or more of them are unusable.
+	//
+	// If Client.Sync is ever called, the Client may cache an alternate
+	// set of endpoints to continue operation.
+	Endpoints []string
+
+	// Transport is used by the Client to drive HTTP requests. If not
+	// provided, DefaultTransport will be used.
+	Transport CancelableTransport
+
+	// CheckRedirect specifies the policy for handling HTTP redirects.
+	// If CheckRedirect is not nil, the Client calls it before
+	// following an HTTP redirect. The sole argument is the number of
+	// requests that have alrady been made. If CheckRedirect returns
+	// an error, Client.Do will not make any further requests and return
+	// the error back it to the caller.
+	//
+	// If CheckRedirect is nil, the Client uses its default policy,
+	// which is to stop after 10 consecutive requests.
+	CheckRedirect CheckRedirectFunc
+
+	// Username specifies the user credential to add as an authorization header
+	Username string
+
+	// Password is the password for the specified user to add as an authorization header
+	// to the request.
+	Password string
+
+	// HeaderTimeoutPerRequest specifies the time limit to wait for response
+	// header in a single request made by the Client. The timeout includes
+	// connection time, any redirects, and header wait time.
+	//
+	// For non-watch GET request, server returns the response body immediately.
+	// For PUT/POST/DELETE request, server will attempt to commit request
+	// before responding, which is expected to take `100ms + 2 * RTT`.
+	// For watch request, server returns the header immediately to notify Client
+	// watch start. But if server is behind some kind of proxy, the response
+	// header may be cached at proxy, and Client cannot rely on this behavior.
+	//
+	// One API call may send multiple requests to different etcd servers until it
+	// succeeds. Use context of the API to specify the overall timeout.
+	//
+	// A HeaderTimeoutPerRequest of zero means no timeout.
+	HeaderTimeoutPerRequest time.Duration
+}
+
+func (cfg *Config) transport() CancelableTransport {
+	if cfg.Transport == nil {
+		return DefaultTransport
+	}
+	return cfg.Transport
+}
+
+func (cfg *Config) checkRedirect() CheckRedirectFunc {
+	if cfg.CheckRedirect == nil {
+		return DefaultCheckRedirect
+	}
+	return cfg.CheckRedirect
+}
+
+// CancelableTransport mimics net/http.Transport, but requires that
+// the object also support request cancellation.
+type CancelableTransport interface {
+	http.RoundTripper
+	CancelRequest(req *http.Request)
+}
+
+type CheckRedirectFunc func(via int) error
+
+// DefaultCheckRedirect follows up to 10 redirects, but no more.
+var DefaultCheckRedirect CheckRedirectFunc = func(via int) error {
+	if via > 10 {
+		return ErrTooManyRedirects
+	}
+	return nil
+}
+
+type Client interface {
+	// Sync updates the internal cache of the etcd cluster's membership.
+	Sync(context.Context) error
+
+	// AutoSync periodically calls Sync() every given interval.
+	// The recommended sync interval is 10 seconds to 1 minute, which does
+	// not bring too much overhead to server and makes client catch up the
+	// cluster change in time.
+	//
+	// The example to use it:
+	//
+	//  for {
+	//      err := client.AutoSync(ctx, 10*time.Second)
+	//      if err == context.DeadlineExceeded || err == context.Canceled {
+	//          break
+	//      }
+	//      log.Print(err)
+	//  }
+	AutoSync(context.Context, time.Duration) error
+
+	// Endpoints returns a copy of the current set of API endpoints used
+	// by Client to resolve HTTP requests. If Sync has ever been called,
+	// this may differ from the initial Endpoints provided in the Config.
+	Endpoints() []string
+
+	httpClient
+}
+
+func New(cfg Config) (Client, error) {
+	c := &httpClusterClient{
+		clientFactory: newHTTPClientFactory(cfg.transport(), cfg.checkRedirect(), cfg.HeaderTimeoutPerRequest),
+		rand:          rand.New(rand.NewSource(int64(time.Now().Nanosecond()))),
+	}
+	if cfg.Username != "" {
+		c.credentials = &credentials{
+			username: cfg.Username,
+			password: cfg.Password,
+		}
+	}
+	if err := c.reset(cfg.Endpoints); err != nil {
+		return nil, err
+	}
+	return c, nil
+}
+
+type httpClient interface {
+	Do(context.Context, httpAction) (*http.Response, []byte, error)
+}
+
+func newHTTPClientFactory(tr CancelableTransport, cr CheckRedirectFunc, headerTimeout time.Duration) httpClientFactory {
+	return func(ep url.URL) httpClient {
+		return &redirectFollowingHTTPClient{
+			checkRedirect: cr,
+			client: &simpleHTTPClient{
+				transport:     tr,
+				endpoint:      ep,
+				headerTimeout: headerTimeout,
+			},
+		}
+	}
+}
+
+type credentials struct {
+	username string
+	password string
+}
+
+type httpClientFactory func(url.URL) httpClient
+
+type httpAction interface {
+	HTTPRequest(url.URL) *http.Request
+}
+
+type httpClusterClient struct {
+	clientFactory httpClientFactory
+	endpoints     []url.URL
+	pinned        int
+	credentials   *credentials
+	sync.RWMutex
+	rand *rand.Rand
+}
+
+func (c *httpClusterClient) reset(eps []string) error {
+	if len(eps) == 0 {
+		return ErrNoEndpoints
+	}
+
+	neps := make([]url.URL, len(eps))
+	for i, ep := range eps {
+		u, err := url.Parse(ep)
+		if err != nil {
+			return err
+		}
+		neps[i] = *u
+	}
+
+	c.endpoints = shuffleEndpoints(c.rand, neps)
+	// TODO: pin old endpoint if possible, and rebalance when new endpoint appears
+	c.pinned = 0
+
+	return nil
+}
+
+func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) {
+	action := act
+	c.RLock()
+	leps := len(c.endpoints)
+	eps := make([]url.URL, leps)
+	n := copy(eps, c.endpoints)
+	pinned := c.pinned
+
+	if c.credentials != nil {
+		action = &authedAction{
+			act:         act,
+			credentials: *c.credentials,
+		}
+	}
+	c.RUnlock()
+
+	if leps == 0 {
+		return nil, nil, ErrNoEndpoints
+	}
+
+	if leps != n {
+		return nil, nil, errors.New("unable to pick endpoint: copy failed")
+	}
+
+	var resp *http.Response
+	var body []byte
+	var err error
+	cerr := &ClusterError{}
+
+	for i := pinned; i < leps+pinned; i++ {
+		k := i % leps
+		hc := c.clientFactory(eps[k])
+		resp, body, err = hc.Do(ctx, action)
+		if err != nil {
+			cerr.Errors = append(cerr.Errors, err)
+			// mask previous errors with context error, which is controlled by user
+			if err == context.Canceled || err == context.DeadlineExceeded {
+				return nil, nil, err
+			}
+			continue
+		}
+		if resp.StatusCode/100 == 5 {
+			switch resp.StatusCode {
+			case http.StatusInternalServerError, http.StatusServiceUnavailable:
+				// TODO: make sure this is a no leader response
+				cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s has no leader", eps[k].String()))
+			default:
+				cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode)))
+			}
+			continue
+		}
+		if k != pinned {
+			c.Lock()
+			c.pinned = k
+			c.Unlock()
+		}
+		return resp, body, nil
+	}
+
+	return nil, nil, cerr
+}
+
+func (c *httpClusterClient) Endpoints() []string {
+	c.RLock()
+	defer c.RUnlock()
+
+	eps := make([]string, len(c.endpoints))
+	for i, ep := range c.endpoints {
+		eps[i] = ep.String()
+	}
+
+	return eps
+}
+
+func (c *httpClusterClient) Sync(ctx context.Context) error {
+	mAPI := NewMembersAPI(c)
+	ms, err := mAPI.List(ctx)
+	if err != nil {
+		return err
+	}
+
+	c.Lock()
+	defer c.Unlock()
+
+	eps := make([]string, 0)
+	for _, m := range ms {
+		eps = append(eps, m.ClientURLs...)
+	}
+	sort.Sort(sort.StringSlice(eps))
+
+	ceps := make([]string, len(c.endpoints))
+	for i, cep := range c.endpoints {
+		ceps[i] = cep.String()
+	}
+	sort.Sort(sort.StringSlice(ceps))
+	// fast path if no change happens
+	// this helps client to pin the endpoint when no cluster change
+	if reflect.DeepEqual(eps, ceps) {
+		return nil
+	}
+
+	return c.reset(eps)
+}
+
+func (c *httpClusterClient) AutoSync(ctx context.Context, interval time.Duration) error {
+	ticker := time.NewTicker(interval)
+	defer ticker.Stop()
+	for {
+		err := c.Sync(ctx)
+		if err != nil {
+			return err
+		}
+		select {
+		case <-ctx.Done():
+			return ctx.Err()
+		case <-ticker.C:
+		}
+	}
+}
+
+type roundTripResponse struct {
+	resp *http.Response
+	err  error
+}
+
+type simpleHTTPClient struct {
+	transport     CancelableTransport
+	endpoint      url.URL
+	headerTimeout time.Duration
+}
+
+func (c *simpleHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) {
+	req := act.HTTPRequest(c.endpoint)
+
+	if err := printcURL(req); err != nil {
+		return nil, nil, err
+	}
+
+	hctx, hcancel := context.WithCancel(ctx)
+	if c.headerTimeout > 0 {
+		hctx, hcancel = context.WithTimeout(ctx, c.headerTimeout)
+	}
+	defer hcancel()
+
+	reqcancel := requestCanceler(c.transport, req)
+
+	rtchan := make(chan roundTripResponse, 1)
+	go func() {
+		resp, err := c.transport.RoundTrip(req)
+		rtchan <- roundTripResponse{resp: resp, err: err}
+		close(rtchan)
+	}()
+
+	var resp *http.Response
+	var err error
+
+	select {
+	case rtresp := <-rtchan:
+		resp, err = rtresp.resp, rtresp.err
+	case <-hctx.Done():
+		// cancel and wait for request to actually exit before continuing
+		reqcancel()
+		rtresp := <-rtchan
+		resp = rtresp.resp
+		switch {
+		case ctx.Err() != nil:
+			err = ctx.Err()
+		case hctx.Err() != nil:
+			err = fmt.Errorf("client: endpoint %s exceeded header timeout", c.endpoint.String())
+		default:
+			panic("failed to get error from context")
+		}
+	}
+
+	// always check for resp nil-ness to deal with possible
+	// race conditions between channels above
+	defer func() {
+		if resp != nil {
+			resp.Body.Close()
+		}
+	}()
+
+	if err != nil {
+		return nil, nil, err
+	}
+
+	var body []byte
+	done := make(chan struct{})
+	go func() {
+		body, err = ioutil.ReadAll(resp.Body)
+		done <- struct{}{}
+	}()
+
+	select {
+	case <-ctx.Done():
+		resp.Body.Close()
+		<-done
+		return nil, nil, ctx.Err()
+	case <-done:
+	}
+
+	return resp, body, err
+}
+
+type authedAction struct {
+	act         httpAction
+	credentials credentials
+}
+
+func (a *authedAction) HTTPRequest(url url.URL) *http.Request {
+	r := a.act.HTTPRequest(url)
+	r.SetBasicAuth(a.credentials.username, a.credentials.password)
+	return r
+}
+
+type redirectFollowingHTTPClient struct {
+	client        httpClient
+	checkRedirect CheckRedirectFunc
+}
+
+func (r *redirectFollowingHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) {
+	next := act
+	for i := 0; i < 100; i++ {
+		if i > 0 {
+			if err := r.checkRedirect(i); err != nil {
+				return nil, nil, err
+			}
+		}
+		resp, body, err := r.client.Do(ctx, next)
+		if err != nil {
+			return nil, nil, err
+		}
+		if resp.StatusCode/100 == 3 {
+			hdr := resp.Header.Get("Location")
+			if hdr == "" {
+				return nil, nil, fmt.Errorf("Location header not set")
+			}
+			loc, err := url.Parse(hdr)
+			if err != nil {
+				return nil, nil, fmt.Errorf("Location header not valid URL: %s", hdr)
+			}
+			next = &redirectedHTTPAction{
+				action:   act,
+				location: *loc,
+			}
+			continue
+		}
+		return resp, body, nil
+	}
+
+	return nil, nil, errTooManyRedirectChecks
+}
+
+type redirectedHTTPAction struct {
+	action   httpAction
+	location url.URL
+}
+
+func (r *redirectedHTTPAction) HTTPRequest(ep url.URL) *http.Request {
+	orig := r.action.HTTPRequest(ep)
+	orig.URL = &r.location
+	return orig
+}
+
+func shuffleEndpoints(r *rand.Rand, eps []url.URL) []url.URL {
+	p := r.Perm(len(eps))
+	neps := make([]url.URL, len(eps))
+	for i, k := range p {
+		neps[i] = eps[k]
+	}
+	return neps
+}

+ 896 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go

@@ -0,0 +1,896 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"errors"
+	"io"
+	"io/ioutil"
+	"math/rand"
+	"net/http"
+	"net/url"
+	"reflect"
+	"sort"
+	"strings"
+	"testing"
+	"time"
+
+	"github.com/coreos/etcd/pkg/testutil"
+	"golang.org/x/net/context"
+)
+
+type actionAssertingHTTPClient struct {
+	t   *testing.T
+	num int
+	act httpAction
+
+	resp http.Response
+	body []byte
+	err  error
+}
+
+func (a *actionAssertingHTTPClient) Do(_ context.Context, act httpAction) (*http.Response, []byte, error) {
+	if !reflect.DeepEqual(a.act, act) {
+		a.t.Errorf("#%d: unexpected httpAction: want=%#v got=%#v", a.num, a.act, act)
+	}
+
+	return &a.resp, a.body, a.err
+}
+
+type staticHTTPClient struct {
+	resp http.Response
+	body []byte
+	err  error
+}
+
+func (s *staticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) {
+	return &s.resp, s.body, s.err
+}
+
+type staticHTTPAction struct {
+	request http.Request
+}
+
+func (s *staticHTTPAction) HTTPRequest(url.URL) *http.Request {
+	return &s.request
+}
+
+type staticHTTPResponse struct {
+	resp http.Response
+	body []byte
+	err  error
+}
+
+type multiStaticHTTPClient struct {
+	responses []staticHTTPResponse
+	cur       int
+}
+
+func (s *multiStaticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) {
+	r := s.responses[s.cur]
+	s.cur++
+	return &r.resp, r.body, r.err
+}
+
+func newStaticHTTPClientFactory(responses []staticHTTPResponse) httpClientFactory {
+	var cur int
+	return func(url.URL) httpClient {
+		r := responses[cur]
+		cur++
+		return &staticHTTPClient{resp: r.resp, body: r.body, err: r.err}
+	}
+}
+
+type fakeTransport struct {
+	respchan     chan *http.Response
+	errchan      chan error
+	startCancel  chan struct{}
+	finishCancel chan struct{}
+}
+
+func newFakeTransport() *fakeTransport {
+	return &fakeTransport{
+		respchan:     make(chan *http.Response, 1),
+		errchan:      make(chan error, 1),
+		startCancel:  make(chan struct{}, 1),
+		finishCancel: make(chan struct{}, 1),
+	}
+}
+
+func (t *fakeTransport) CancelRequest(*http.Request) {
+	t.startCancel <- struct{}{}
+}
+
+type fakeAction struct{}
+
+func (a *fakeAction) HTTPRequest(url.URL) *http.Request {
+	return &http.Request{}
+}
+
+func TestSimpleHTTPClientDoSuccess(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	tr.respchan <- &http.Response{
+		StatusCode: http.StatusTeapot,
+		Body:       ioutil.NopCloser(strings.NewReader("foo")),
+	}
+
+	resp, body, err := c.Do(context.Background(), &fakeAction{})
+	if err != nil {
+		t.Fatalf("incorrect error value: want=nil got=%v", err)
+	}
+
+	wantCode := http.StatusTeapot
+	if wantCode != resp.StatusCode {
+		t.Fatalf("invalid response code: want=%d got=%d", wantCode, resp.StatusCode)
+	}
+
+	wantBody := []byte("foo")
+	if !reflect.DeepEqual(wantBody, body) {
+		t.Fatalf("invalid response body: want=%q got=%q", wantBody, body)
+	}
+}
+
+func TestSimpleHTTPClientDoError(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	tr.errchan <- errors.New("fixture")
+
+	_, _, err := c.Do(context.Background(), &fakeAction{})
+	if err == nil {
+		t.Fatalf("expected non-nil error, got nil")
+	}
+}
+
+func TestSimpleHTTPClientDoCancelContext(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	tr.startCancel <- struct{}{}
+	tr.finishCancel <- struct{}{}
+
+	_, _, err := c.Do(context.Background(), &fakeAction{})
+	if err == nil {
+		t.Fatalf("expected non-nil error, got nil")
+	}
+}
+
+type checkableReadCloser struct {
+	io.ReadCloser
+	closed bool
+}
+
+func (c *checkableReadCloser) Close() error {
+	if !c.closed {
+		c.closed = true
+		return c.ReadCloser.Close()
+	}
+	return nil
+}
+
+func TestSimpleHTTPClientDoCancelContextResponseBodyClosed(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	// create an already-cancelled context
+	ctx, cancel := context.WithCancel(context.Background())
+	cancel()
+
+	body := &checkableReadCloser{ReadCloser: ioutil.NopCloser(strings.NewReader("foo"))}
+	go func() {
+		// wait that simpleHTTPClient knows the context is already timed out,
+		// and calls CancelRequest
+		testutil.WaitSchedule()
+
+		// response is returned before cancel effects
+		tr.respchan <- &http.Response{Body: body}
+	}()
+
+	_, _, err := c.Do(ctx, &fakeAction{})
+	if err == nil {
+		t.Fatalf("expected non-nil error, got nil")
+	}
+
+	if !body.closed {
+		t.Fatalf("expected closed body")
+	}
+}
+
+type blockingBody struct {
+	c chan struct{}
+}
+
+func (bb *blockingBody) Read(p []byte) (n int, err error) {
+	<-bb.c
+	return 0, errors.New("closed")
+}
+
+func (bb *blockingBody) Close() error {
+	close(bb.c)
+	return nil
+}
+
+func TestSimpleHTTPClientDoCancelContextResponseBodyClosedWithBlockingBody(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	ctx, cancel := context.WithCancel(context.Background())
+	body := &checkableReadCloser{ReadCloser: &blockingBody{c: make(chan struct{})}}
+	go func() {
+		tr.respchan <- &http.Response{Body: body}
+		time.Sleep(2 * time.Millisecond)
+		// cancel after the body is received
+		cancel()
+	}()
+
+	_, _, err := c.Do(ctx, &fakeAction{})
+	if err != context.Canceled {
+		t.Fatalf("expected %+v, got %+v", context.Canceled, err)
+	}
+
+	if !body.closed {
+		t.Fatalf("expected closed body")
+	}
+}
+
+func TestSimpleHTTPClientDoCancelContextWaitForRoundTrip(t *testing.T) {
+	tr := newFakeTransport()
+	c := &simpleHTTPClient{transport: tr}
+
+	donechan := make(chan struct{})
+	ctx, cancel := context.WithCancel(context.Background())
+	go func() {
+		c.Do(ctx, &fakeAction{})
+		close(donechan)
+	}()
+
+	// This should call CancelRequest and begin the cancellation process
+	cancel()
+
+	select {
+	case <-donechan:
+		t.Fatalf("simpleHTTPClient.Do should not have exited yet")
+	default:
+	}
+
+	tr.finishCancel <- struct{}{}
+
+	select {
+	case <-donechan:
+		//expected behavior
+		return
+	case <-time.After(time.Second):
+		t.Fatalf("simpleHTTPClient.Do did not exit within 1s")
+	}
+}
+
+func TestSimpleHTTPClientDoHeaderTimeout(t *testing.T) {
+	tr := newFakeTransport()
+	tr.finishCancel <- struct{}{}
+	c := &simpleHTTPClient{transport: tr, headerTimeout: time.Millisecond}
+
+	errc := make(chan error)
+	go func() {
+		_, _, err := c.Do(context.Background(), &fakeAction{})
+		errc <- err
+	}()
+
+	select {
+	case err := <-errc:
+		if err == nil {
+			t.Fatalf("expected non-nil error, got nil")
+		}
+	case <-time.After(time.Second):
+		t.Fatalf("unexpected timeout when waitting for the test to finish")
+	}
+}
+
+func TestHTTPClusterClientDo(t *testing.T) {
+	fakeErr := errors.New("fake!")
+	fakeURL := url.URL{}
+	tests := []struct {
+		client     *httpClusterClient
+		wantCode   int
+		wantErr    error
+		wantPinned int
+	}{
+		// first good response short-circuits Do
+		{
+			client: &httpClusterClient{
+				endpoints: []url.URL{fakeURL, fakeURL},
+				clientFactory: newStaticHTTPClientFactory(
+					[]staticHTTPResponse{
+						{resp: http.Response{StatusCode: http.StatusTeapot}},
+						{err: fakeErr},
+					},
+				),
+				rand: rand.New(rand.NewSource(0)),
+			},
+			wantCode: http.StatusTeapot,
+		},
+
+		// fall through to good endpoint if err is arbitrary
+		{
+			client: &httpClusterClient{
+				endpoints: []url.URL{fakeURL, fakeURL},
+				clientFactory: newStaticHTTPClientFactory(
+					[]staticHTTPResponse{
+						{err: fakeErr},
+						{resp: http.Response{StatusCode: http.StatusTeapot}},
+					},
+				),
+				rand: rand.New(rand.NewSource(0)),
+			},
+			wantCode:   http.StatusTeapot,
+			wantPinned: 1,
+		},
+
+		// context.Canceled short-circuits Do
+		{
+			client: &httpClusterClient{
+				endpoints: []url.URL{fakeURL, fakeURL},
+				clientFactory: newStaticHTTPClientFactory(
+					[]staticHTTPResponse{
+						{err: context.Canceled},
+						{resp: http.Response{StatusCode: http.StatusTeapot}},
+					},
+				),
+				rand: rand.New(rand.NewSource(0)),
+			},
+			wantErr: context.Canceled,
+		},
+
+		// return err if there are no endpoints
+		{
+			client: &httpClusterClient{
+				endpoints:     []url.URL{},
+				clientFactory: newHTTPClientFactory(nil, nil, 0),
+				rand:          rand.New(rand.NewSource(0)),
+			},
+			wantErr: ErrNoEndpoints,
+		},
+
+		// return err if all endpoints return arbitrary errors
+		{
+			client: &httpClusterClient{
+				endpoints: []url.URL{fakeURL, fakeURL},
+				clientFactory: newStaticHTTPClientFactory(
+					[]staticHTTPResponse{
+						{err: fakeErr},
+						{err: fakeErr},
+					},
+				),
+				rand: rand.New(rand.NewSource(0)),
+			},
+			wantErr: &ClusterError{Errors: []error{fakeErr, fakeErr}},
+		},
+
+		// 500-level errors cause Do to fallthrough to next endpoint
+		{
+			client: &httpClusterClient{
+				endpoints: []url.URL{fakeURL, fakeURL},
+				clientFactory: newStaticHTTPClientFactory(
+					[]staticHTTPResponse{
+						{resp: http.Response{StatusCode: http.StatusBadGateway}},
+						{resp: http.Response{StatusCode: http.StatusTeapot}},
+					},
+				),
+				rand: rand.New(rand.NewSource(0)),
+			},
+			wantCode:   http.StatusTeapot,
+			wantPinned: 1,
+		},
+	}
+
+	for i, tt := range tests {
+		resp, _, err := tt.client.Do(context.Background(), nil)
+		if !reflect.DeepEqual(tt.wantErr, err) {
+			t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr)
+			continue
+		}
+
+		if resp == nil {
+			if tt.wantCode != 0 {
+				t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode)
+			}
+			continue
+		}
+
+		if resp.StatusCode != tt.wantCode {
+			t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode)
+			continue
+		}
+
+		if tt.client.pinned != tt.wantPinned {
+			t.Errorf("#%d: pinned=%d, want=%d", i, tt.client.pinned, tt.wantPinned)
+		}
+	}
+}
+
+func TestHTTPClusterClientDoDeadlineExceedContext(t *testing.T) {
+	fakeURL := url.URL{}
+	tr := newFakeTransport()
+	tr.finishCancel <- struct{}{}
+	c := &httpClusterClient{
+		clientFactory: newHTTPClientFactory(tr, DefaultCheckRedirect, 0),
+		endpoints:     []url.URL{fakeURL},
+	}
+
+	errc := make(chan error)
+	go func() {
+		ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond)
+		defer cancel()
+		_, _, err := c.Do(ctx, &fakeAction{})
+		errc <- err
+	}()
+
+	select {
+	case err := <-errc:
+		if err != context.DeadlineExceeded {
+			t.Errorf("err = %+v, want %+v", err, context.DeadlineExceeded)
+		}
+	case <-time.After(time.Second):
+		t.Fatalf("unexpected timeout when waitting for request to deadline exceed")
+	}
+}
+
+func TestRedirectedHTTPAction(t *testing.T) {
+	act := &redirectedHTTPAction{
+		action: &staticHTTPAction{
+			request: http.Request{
+				Method: "DELETE",
+				URL: &url.URL{
+					Scheme: "https",
+					Host:   "foo.example.com",
+					Path:   "/ping",
+				},
+			},
+		},
+		location: url.URL{
+			Scheme: "https",
+			Host:   "bar.example.com",
+			Path:   "/pong",
+		},
+	}
+
+	want := &http.Request{
+		Method: "DELETE",
+		URL: &url.URL{
+			Scheme: "https",
+			Host:   "bar.example.com",
+			Path:   "/pong",
+		},
+	}
+	got := act.HTTPRequest(url.URL{Scheme: "http", Host: "baz.example.com", Path: "/pang"})
+
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("HTTPRequest is %#v, want %#v", want, got)
+	}
+}
+
+func TestRedirectFollowingHTTPClient(t *testing.T) {
+	tests := []struct {
+		checkRedirect CheckRedirectFunc
+		client        httpClient
+		wantCode      int
+		wantErr       error
+	}{
+		// errors bubbled up
+		{
+			checkRedirect: func(int) error { return ErrTooManyRedirects },
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						err: errors.New("fail!"),
+					},
+				},
+			},
+			wantErr: errors.New("fail!"),
+		},
+
+		// no need to follow redirect if none given
+		{
+			checkRedirect: func(int) error { return ErrTooManyRedirects },
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTeapot,
+						},
+					},
+				},
+			},
+			wantCode: http.StatusTeapot,
+		},
+
+		// redirects if less than max
+		{
+			checkRedirect: func(via int) error {
+				if via >= 2 {
+					return ErrTooManyRedirects
+				}
+				return nil
+			},
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{"http://example.com"}},
+						},
+					},
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTeapot,
+						},
+					},
+				},
+			},
+			wantCode: http.StatusTeapot,
+		},
+
+		// succeed after reaching max redirects
+		{
+			checkRedirect: func(via int) error {
+				if via >= 3 {
+					return ErrTooManyRedirects
+				}
+				return nil
+			},
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{"http://example.com"}},
+						},
+					},
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{"http://example.com"}},
+						},
+					},
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTeapot,
+						},
+					},
+				},
+			},
+			wantCode: http.StatusTeapot,
+		},
+
+		// fail if too many redirects
+		{
+			checkRedirect: func(via int) error {
+				if via >= 2 {
+					return ErrTooManyRedirects
+				}
+				return nil
+			},
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{"http://example.com"}},
+						},
+					},
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{"http://example.com"}},
+						},
+					},
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTeapot,
+						},
+					},
+				},
+			},
+			wantErr: ErrTooManyRedirects,
+		},
+
+		// fail if Location header not set
+		{
+			checkRedirect: func(int) error { return ErrTooManyRedirects },
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+						},
+					},
+				},
+			},
+			wantErr: errors.New("Location header not set"),
+		},
+
+		// fail if Location header is invalid
+		{
+			checkRedirect: func(int) error { return ErrTooManyRedirects },
+			client: &multiStaticHTTPClient{
+				responses: []staticHTTPResponse{
+					{
+						resp: http.Response{
+							StatusCode: http.StatusTemporaryRedirect,
+							Header:     http.Header{"Location": []string{":"}},
+						},
+					},
+				},
+			},
+			wantErr: errors.New("Location header not valid URL: :"),
+		},
+
+		// fail if redirects checked way too many times
+		{
+			checkRedirect: func(int) error { return nil },
+			client: &staticHTTPClient{
+				resp: http.Response{
+					StatusCode: http.StatusTemporaryRedirect,
+					Header:     http.Header{"Location": []string{"http://example.com"}},
+				},
+			},
+			wantErr: errTooManyRedirectChecks,
+		},
+	}
+
+	for i, tt := range tests {
+		client := &redirectFollowingHTTPClient{client: tt.client, checkRedirect: tt.checkRedirect}
+		resp, _, err := client.Do(context.Background(), nil)
+		if !reflect.DeepEqual(tt.wantErr, err) {
+			t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr)
+			continue
+		}
+
+		if resp == nil {
+			if tt.wantCode != 0 {
+				t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode)
+			}
+			continue
+		}
+
+		if resp.StatusCode != tt.wantCode {
+			t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode)
+			continue
+		}
+	}
+}
+
+func TestDefaultCheckRedirect(t *testing.T) {
+	tests := []struct {
+		num int
+		err error
+	}{
+		{0, nil},
+		{5, nil},
+		{10, nil},
+		{11, ErrTooManyRedirects},
+		{29, ErrTooManyRedirects},
+	}
+
+	for i, tt := range tests {
+		err := DefaultCheckRedirect(tt.num)
+		if !reflect.DeepEqual(tt.err, err) {
+			t.Errorf("#%d: want=%#v got=%#v", i, tt.err, err)
+		}
+	}
+}
+
+func TestHTTPClusterClientSync(t *testing.T) {
+	cf := newStaticHTTPClientFactory([]staticHTTPResponse{
+		{
+			resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}},
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+	})
+
+	hc := &httpClusterClient{
+		clientFactory: cf,
+		rand:          rand.New(rand.NewSource(0)),
+	}
+	err := hc.reset([]string{"http://127.0.0.1:2379"})
+	if err != nil {
+		t.Fatalf("unexpected error during setup: %#v", err)
+	}
+
+	want := []string{"http://127.0.0.1:2379"}
+	got := hc.Endpoints()
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got)
+	}
+
+	err = hc.Sync(context.Background())
+	if err != nil {
+		t.Fatalf("unexpected error during Sync: %#v", err)
+	}
+
+	want = []string{"http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"}
+	got = hc.Endpoints()
+	sort.Sort(sort.StringSlice(got))
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("incorrect endpoints post-Sync: want=%#v got=%#v", want, got)
+	}
+
+	err = hc.reset([]string{"http://127.0.0.1:4009"})
+	if err != nil {
+		t.Fatalf("unexpected error during reset: %#v", err)
+	}
+
+	want = []string{"http://127.0.0.1:4009"}
+	got = hc.Endpoints()
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("incorrect endpoints post-reset: want=%#v got=%#v", want, got)
+	}
+}
+
+func TestHTTPClusterClientSyncFail(t *testing.T) {
+	cf := newStaticHTTPClientFactory([]staticHTTPResponse{
+		{err: errors.New("fail!")},
+	})
+
+	hc := &httpClusterClient{
+		clientFactory: cf,
+		rand:          rand.New(rand.NewSource(0)),
+	}
+	err := hc.reset([]string{"http://127.0.0.1:2379"})
+	if err != nil {
+		t.Fatalf("unexpected error during setup: %#v", err)
+	}
+
+	want := []string{"http://127.0.0.1:2379"}
+	got := hc.Endpoints()
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got)
+	}
+
+	err = hc.Sync(context.Background())
+	if err == nil {
+		t.Fatalf("got nil error during Sync")
+	}
+
+	got = hc.Endpoints()
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("incorrect endpoints after failed Sync: want=%#v got=%#v", want, got)
+	}
+}
+
+func TestHTTPClusterClientAutoSyncCancelContext(t *testing.T) {
+	cf := newStaticHTTPClientFactory([]staticHTTPResponse{
+		{
+			resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}},
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+	})
+
+	hc := &httpClusterClient{
+		clientFactory: cf,
+		rand:          rand.New(rand.NewSource(0)),
+	}
+	err := hc.reset([]string{"http://127.0.0.1:2379"})
+	if err != nil {
+		t.Fatalf("unexpected error during setup: %#v", err)
+	}
+	ctx, cancel := context.WithCancel(context.Background())
+	cancel()
+
+	err = hc.AutoSync(ctx, time.Hour)
+	if err != context.Canceled {
+		t.Fatalf("incorrect error value: want=%v got=%v", context.Canceled, err)
+	}
+}
+
+func TestHTTPClusterClientAutoSyncFail(t *testing.T) {
+	cf := newStaticHTTPClientFactory([]staticHTTPResponse{
+		{err: errors.New("fail!")},
+	})
+
+	hc := &httpClusterClient{
+		clientFactory: cf,
+		rand:          rand.New(rand.NewSource(0)),
+	}
+	err := hc.reset([]string{"http://127.0.0.1:2379"})
+	if err != nil {
+		t.Fatalf("unexpected error during setup: %#v", err)
+	}
+
+	err = hc.AutoSync(context.Background(), time.Hour)
+	if err.Error() != ErrClusterUnavailable.Error() {
+		t.Fatalf("incorrect error value: want=%v got=%v", ErrClusterUnavailable, err)
+	}
+}
+
+// TestHTTPClusterClientSyncPinEndpoint tests that Sync() pins the endpoint when
+// it gets the exactly same member list as before.
+func TestHTTPClusterClientSyncPinEndpoint(t *testing.T) {
+	cf := newStaticHTTPClientFactory([]staticHTTPResponse{
+		{
+			resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}},
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+		{
+			resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}},
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+		{
+			resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}},
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+	})
+
+	hc := &httpClusterClient{
+		clientFactory: cf,
+		rand:          rand.New(rand.NewSource(0)),
+	}
+	err := hc.reset([]string{"http://127.0.0.1:4003", "http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002"})
+	if err != nil {
+		t.Fatalf("unexpected error during setup: %#v", err)
+	}
+	pinnedEndpoint := hc.endpoints[hc.pinned]
+
+	for i := 0; i < 3; i++ {
+		err = hc.Sync(context.Background())
+		if err != nil {
+			t.Fatalf("#%d: unexpected error during Sync: %#v", i, err)
+		}
+
+		if g := hc.endpoints[hc.pinned]; g != pinnedEndpoint {
+			t.Errorf("#%d: pinned endpoint = %s, want %s", i, g, pinnedEndpoint)
+		}
+	}
+}
+
+func TestHTTPClusterClientResetFail(t *testing.T) {
+	tests := [][]string{
+		// need at least one endpoint
+		{},
+
+		// urls must be valid
+		{":"},
+	}
+
+	for i, tt := range tests {
+		hc := &httpClusterClient{rand: rand.New(rand.NewSource(0))}
+		err := hc.reset(tt)
+		if err == nil {
+			t.Errorf("#%d: expected non-nil error", i)
+		}
+	}
+}
+
+func TestHTTPClusterClientResetPinRandom(t *testing.T) {
+	round := 2000
+	pinNum := 0
+	for i := 0; i < round; i++ {
+		hc := &httpClusterClient{rand: rand.New(rand.NewSource(int64(i)))}
+		err := hc.reset([]string{"http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"})
+		if err != nil {
+			t.Fatalf("#%d: reset error (%v)", i, err)
+		}
+		if hc.endpoints[hc.pinned].String() == "http://127.0.0.1:4001" {
+			pinNum++
+		}
+	}
+
+	min := 1.0/3.0 - 0.05
+	max := 1.0/3.0 + 0.05
+	if ratio := float64(pinNum) / float64(round); ratio > max || ratio < min {
+		t.Errorf("pinned ratio = %v, want [%v, %v]", ratio, min, max)
+	}
+}

+ 33 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go

@@ -0,0 +1,33 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import "fmt"
+
+type ClusterError struct {
+	Errors []error
+}
+
+func (ce *ClusterError) Error() string {
+	return ErrClusterUnavailable.Error()
+}
+
+func (ce *ClusterError) Detail() string {
+	s := ""
+	for i, e := range ce.Errors {
+		s += fmt.Sprintf("error #%d: %s\n", i, e)
+	}
+	return s
+}

+ 70 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go

@@ -0,0 +1,70 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"bytes"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+)
+
+var (
+	cURLDebug = false
+)
+
+func EnablecURLDebug() {
+	cURLDebug = true
+}
+
+func DisablecURLDebug() {
+	cURLDebug = false
+}
+
+// printcURL prints the cURL equivalent request to stderr.
+// It returns an error if the body of the request cannot
+// be read.
+// The caller MUST cancel the request if there is an error.
+func printcURL(req *http.Request) error {
+	if !cURLDebug {
+		return nil
+	}
+	var (
+		command string
+		b       []byte
+		err     error
+	)
+
+	if req.URL != nil {
+		command = fmt.Sprintf("curl -X %s %s", req.Method, req.URL.String())
+	}
+
+	if req.Body != nil {
+		b, err = ioutil.ReadAll(req.Body)
+		if err != nil {
+			return err
+		}
+		command += fmt.Sprintf(" -d %q", string(b))
+	}
+
+	fmt.Fprintf(os.Stderr, "cURL Command: %s\n", command)
+
+	// reset body
+	body := bytes.NewBuffer(b)
+	req.Body = ioutil.NopCloser(body)
+
+	return nil
+}

+ 21 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go

@@ -0,0 +1,21 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+// Discoverer is an interface that wraps the Discover method.
+type Discoverer interface {
+	// Dicover looks up the etcd servers for the domain.
+	Discover(domain string) ([]string, error)
+}

+ 71 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go

@@ -0,0 +1,71 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/*
+Package client provides bindings for the etcd APIs.
+
+Create a Config and exchange it for a Client:
+
+	import (
+		"net/http"
+
+		"github.com/coreos/etcd/client"
+		"golang.org/x/net/context"
+	)
+
+	cfg := client.Config{
+		Endpoints: []string{"http://127.0.0.1:2379"},
+		Transport: DefaultTransport,
+	}
+
+	c, err := client.New(cfg)
+	if err != nil {
+		// handle error
+	}
+
+Create a KeysAPI using the Client, then use it to interact with etcd:
+
+	kAPI := client.NewKeysAPI(c)
+
+	// create a new key /foo with the value "bar"
+	_, err = kAPI.Create(context.Background(), "/foo", "bar")
+	if err != nil {
+		// handle error
+	}
+
+	// delete the newly created key only if the value is still "bar"
+	_, err = kAPI.Delete(context.Background(), "/foo", &DeleteOptions{PrevValue: "bar"})
+	if err != nil {
+		// handle error
+	}
+
+Use a custom context to set timeouts on your operations:
+
+	import "time"
+
+	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+	defer cancel()
+
+	// set a new key, ignoring it's previous state
+	_, err := kAPI.Set(ctx, "/ping", "pong", nil)
+	if err != nil {
+		if err == context.DeadlineExceeded {
+			// request took longer than 5s
+		} else {
+			// handle error
+		}
+	}
+
+*/
+package client

+ 41 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go

@@ -0,0 +1,41 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !go1.5
+
+package client
+
+import (
+	"errors"
+	"net/http"
+)
+
+func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) {
+	select {
+	case resp := <-t.respchan:
+		return resp, nil
+	case err := <-t.errchan:
+		return nil, err
+	case <-t.startCancel:
+		select {
+		// this simulates that the request is finished before cancel effects
+		case resp := <-t.respchan:
+			return resp, nil
+		// wait on finishCancel to simulate taking some amount of
+		// time while calling CancelRequest
+		case <-t.finishCancel:
+			return nil, errors.New("cancelled")
+		}
+	}
+}

+ 42 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go

@@ -0,0 +1,42 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build go1.5
+
+package client
+
+import (
+	"errors"
+	"net/http"
+)
+
+func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) {
+	select {
+	case resp := <-t.respchan:
+		return resp, nil
+	case err := <-t.errchan:
+		return nil, err
+	case <-t.startCancel:
+	case <-req.Cancel:
+	}
+	select {
+	// this simulates that the request is finished before cancel effects
+	case resp := <-t.respchan:
+		return resp, nil
+	// wait on finishCancel to simulate taking some amount of
+	// time while calling CancelRequest
+	case <-t.finishCancel:
+		return nil, errors.New("cancelled")
+	}
+}

+ 891 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go

@@ -0,0 +1,891 @@
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package client
+
+import (
+	"errors"
+	"fmt"
+	codec1978 "github.com/ugorji/go/codec"
+	"reflect"
+	"runtime"
+	"time"
+)
+
+const (
+	codecSelferC_UTF85311         = 1
+	codecSelferC_RAW5311          = 0
+	codecSelverValueTypeArray5311 = 10
+	codecSelverValueTypeMap5311   = 9
+)
+
+var (
+	codecSelferBitsize5311                         = uint8(reflect.TypeOf(uint(0)).Bits())
+	codecSelferOnlyMapOrArrayEncodeToStructErr5311 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer5311 struct{}
+
+func init() {
+	if codec1978.GenVersion != 2 {
+		_, file, _, _ := runtime.Caller(0)
+		err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
+			2, codec1978.GenVersion, file)
+		panic(err)
+	}
+	if false { // reference the types, but skip this branch at build/run time
+		var v0 time.Time
+		_ = v0
+	}
+}
+
+func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperEncoder(e)
+	_, _, _ = h, z, r
+	if x == nil {
+		r.EncodeNil()
+	} else {
+		yysep1 := !z.EncBinary()
+		yy2arr1 := z.EncBasicHandle().StructToArray
+		var yyfirst1 bool
+		var yyq1 [3]bool
+		_, _, _, _ = yysep1, yyfirst1, yyq1, yy2arr1
+		const yyr1 bool = false
+		if yyr1 || yy2arr1 {
+			r.EncodeArrayStart(3)
+		} else {
+			var yynn1 int = 3
+			for _, b := range yyq1 {
+				if b {
+					yynn1++
+				}
+			}
+			r.EncodeMapStart(yynn1)
+		}
+		if yyr1 || yy2arr1 {
+			r.EncodeString(codecSelferC_UTF85311, string(x.Action))
+		} else {
+			yyfirst1 = true
+			r.EncodeString(codecSelferC_UTF85311, string("action"))
+			if yysep1 {
+				r.EncodeMapKVSeparator()
+			}
+			r.EncodeString(codecSelferC_UTF85311, string(x.Action))
+		}
+		if yyr1 || yy2arr1 {
+			if yysep1 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if x.Node == nil {
+				r.EncodeNil()
+			} else {
+				x.Node.CodecEncodeSelf(e)
+			}
+		} else {
+			if yyfirst1 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst1 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("node"))
+			if yysep1 {
+				r.EncodeMapKVSeparator()
+			}
+			if x.Node == nil {
+				r.EncodeNil()
+			} else {
+				x.Node.CodecEncodeSelf(e)
+			}
+		}
+		if yyr1 || yy2arr1 {
+			if yysep1 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if x.PrevNode == nil {
+				r.EncodeNil()
+			} else {
+				x.PrevNode.CodecEncodeSelf(e)
+			}
+		} else {
+			if yyfirst1 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst1 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("prevNode"))
+			if yysep1 {
+				r.EncodeMapKVSeparator()
+			}
+			if x.PrevNode == nil {
+				r.EncodeNil()
+			} else {
+				x.PrevNode.CodecEncodeSelf(e)
+			}
+		}
+		if yysep1 {
+			if yyr1 || yy2arr1 {
+				r.EncodeArrayEnd()
+			} else {
+				r.EncodeMapEnd()
+			}
+		}
+	}
+}
+
+func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	if r.IsContainerType(codecSelverValueTypeMap5311) {
+		yyl5 := r.ReadMapStart()
+		if yyl5 == 0 {
+			r.ReadMapEnd()
+		} else {
+			x.codecDecodeSelfFromMap(yyl5, d)
+		}
+	} else if r.IsContainerType(codecSelverValueTypeArray5311) {
+		yyl5 := r.ReadArrayStart()
+		if yyl5 == 0 {
+			r.ReadArrayEnd()
+		} else {
+			x.codecDecodeSelfFromArray(yyl5, d)
+		}
+	} else {
+		panic(codecSelferOnlyMapOrArrayEncodeToStructErr5311)
+	}
+}
+
+func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	var yys6Slc = z.DecScratchBuffer() // default slice to decode into
+	_ = yys6Slc
+	var yyhl6 bool = l >= 0
+	for yyj6 := 0; ; yyj6++ {
+		if yyhl6 {
+			if yyj6 >= l {
+				break
+			}
+		} else {
+			if r.CheckBreak() {
+				break
+			}
+			if yyj6 > 0 {
+				r.ReadMapEntrySeparator()
+			}
+		}
+		yys6Slc = r.DecodeBytes(yys6Slc, true, true)
+		yys6 := string(yys6Slc)
+		if !yyhl6 {
+			r.ReadMapKVSeparator()
+		}
+		switch yys6 {
+		case "action":
+			if r.TryDecodeAsNil() {
+				x.Action = ""
+			} else {
+				x.Action = string(r.DecodeString())
+			}
+		case "node":
+			if r.TryDecodeAsNil() {
+				if x.Node != nil {
+					x.Node = nil
+				}
+			} else {
+				if x.Node == nil {
+					x.Node = new(Node)
+				}
+				x.Node.CodecDecodeSelf(d)
+			}
+		case "prevNode":
+			if r.TryDecodeAsNil() {
+				if x.PrevNode != nil {
+					x.PrevNode = nil
+				}
+			} else {
+				if x.PrevNode == nil {
+					x.PrevNode = new(Node)
+				}
+				x.PrevNode.CodecDecodeSelf(d)
+			}
+		default:
+			z.DecStructFieldNotFound(-1, yys6)
+		} // end switch yys6
+	} // end for yyj6
+	if !yyhl6 {
+		r.ReadMapEnd()
+	}
+}
+
+func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	var yyj10 int
+	var yyb10 bool
+	var yyhl10 bool = l >= 0
+	yyj10++
+	if yyhl10 {
+		yyb10 = yyj10 > l
+	} else {
+		yyb10 = r.CheckBreak()
+	}
+	if yyb10 {
+		r.ReadArrayEnd()
+		return
+	}
+	if r.TryDecodeAsNil() {
+		x.Action = ""
+	} else {
+		x.Action = string(r.DecodeString())
+	}
+	yyj10++
+	if yyhl10 {
+		yyb10 = yyj10 > l
+	} else {
+		yyb10 = r.CheckBreak()
+	}
+	if yyb10 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		if x.Node != nil {
+			x.Node = nil
+		}
+	} else {
+		if x.Node == nil {
+			x.Node = new(Node)
+		}
+		x.Node.CodecDecodeSelf(d)
+	}
+	yyj10++
+	if yyhl10 {
+		yyb10 = yyj10 > l
+	} else {
+		yyb10 = r.CheckBreak()
+	}
+	if yyb10 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		if x.PrevNode != nil {
+			x.PrevNode = nil
+		}
+	} else {
+		if x.PrevNode == nil {
+			x.PrevNode = new(Node)
+		}
+		x.PrevNode.CodecDecodeSelf(d)
+	}
+	for {
+		yyj10++
+		if yyhl10 {
+			yyb10 = yyj10 > l
+		} else {
+			yyb10 = r.CheckBreak()
+		}
+		if yyb10 {
+			break
+		}
+		if yyj10 > 1 {
+			r.ReadArrayEntrySeparator()
+		}
+		z.DecStructFieldNotFound(yyj10-1, "")
+	}
+	r.ReadArrayEnd()
+}
+
+func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperEncoder(e)
+	_, _, _ = h, z, r
+	if x == nil {
+		r.EncodeNil()
+	} else {
+		yysep14 := !z.EncBinary()
+		yy2arr14 := z.EncBasicHandle().StructToArray
+		var yyfirst14 bool
+		var yyq14 [8]bool
+		_, _, _, _ = yysep14, yyfirst14, yyq14, yy2arr14
+		const yyr14 bool = false
+		yyq14[1] = x.Dir != false
+		yyq14[6] = x.Expiration != nil
+		yyq14[7] = x.TTL != 0
+		if yyr14 || yy2arr14 {
+			r.EncodeArrayStart(8)
+		} else {
+			var yynn14 int = 5
+			for _, b := range yyq14 {
+				if b {
+					yynn14++
+				}
+			}
+			r.EncodeMapStart(yynn14)
+		}
+		if yyr14 || yy2arr14 {
+			r.EncodeString(codecSelferC_UTF85311, string(x.Key))
+		} else {
+			yyfirst14 = true
+			r.EncodeString(codecSelferC_UTF85311, string("key"))
+			if yysep14 {
+				r.EncodeMapKVSeparator()
+			}
+			r.EncodeString(codecSelferC_UTF85311, string(x.Key))
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if yyq14[1] {
+				r.EncodeBool(bool(x.Dir))
+			} else {
+				r.EncodeBool(false)
+			}
+		} else {
+			if yyq14[1] {
+				if yyfirst14 {
+					r.EncodeMapEntrySeparator()
+				} else {
+					yyfirst14 = true
+				}
+				r.EncodeString(codecSelferC_UTF85311, string("dir"))
+				if yysep14 {
+					r.EncodeMapKVSeparator()
+				}
+				r.EncodeBool(bool(x.Dir))
+			}
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			r.EncodeString(codecSelferC_UTF85311, string(x.Value))
+		} else {
+			if yyfirst14 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst14 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("value"))
+			if yysep14 {
+				r.EncodeMapKVSeparator()
+			}
+			r.EncodeString(codecSelferC_UTF85311, string(x.Value))
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if x.Nodes == nil {
+				r.EncodeNil()
+			} else {
+				h.encSlicePtrtoNode(([]*Node)(x.Nodes), e)
+			}
+		} else {
+			if yyfirst14 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst14 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("nodes"))
+			if yysep14 {
+				r.EncodeMapKVSeparator()
+			}
+			if x.Nodes == nil {
+				r.EncodeNil()
+			} else {
+				h.encSlicePtrtoNode(([]*Node)(x.Nodes), e)
+			}
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			r.EncodeUint(uint64(x.CreatedIndex))
+		} else {
+			if yyfirst14 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst14 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("createdIndex"))
+			if yysep14 {
+				r.EncodeMapKVSeparator()
+			}
+			r.EncodeUint(uint64(x.CreatedIndex))
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			r.EncodeUint(uint64(x.ModifiedIndex))
+		} else {
+			if yyfirst14 {
+				r.EncodeMapEntrySeparator()
+			} else {
+				yyfirst14 = true
+			}
+			r.EncodeString(codecSelferC_UTF85311, string("modifiedIndex"))
+			if yysep14 {
+				r.EncodeMapKVSeparator()
+			}
+			r.EncodeUint(uint64(x.ModifiedIndex))
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if yyq14[6] {
+				if x.Expiration == nil {
+					r.EncodeNil()
+				} else {
+					z.EncFallback(x.Expiration)
+				}
+			} else {
+				r.EncodeNil()
+			}
+		} else {
+			if yyq14[6] {
+				if yyfirst14 {
+					r.EncodeMapEntrySeparator()
+				} else {
+					yyfirst14 = true
+				}
+				r.EncodeString(codecSelferC_UTF85311, string("expiration"))
+				if yysep14 {
+					r.EncodeMapKVSeparator()
+				}
+				if x.Expiration == nil {
+					r.EncodeNil()
+				} else {
+					z.EncFallback(x.Expiration)
+				}
+			}
+		}
+		if yyr14 || yy2arr14 {
+			if yysep14 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if yyq14[7] {
+				r.EncodeInt(int64(x.TTL))
+			} else {
+				r.EncodeInt(0)
+			}
+		} else {
+			if yyq14[7] {
+				if yyfirst14 {
+					r.EncodeMapEntrySeparator()
+				} else {
+					yyfirst14 = true
+				}
+				r.EncodeString(codecSelferC_UTF85311, string("ttl"))
+				if yysep14 {
+					r.EncodeMapKVSeparator()
+				}
+				r.EncodeInt(int64(x.TTL))
+			}
+		}
+		if yysep14 {
+			if yyr14 || yy2arr14 {
+				r.EncodeArrayEnd()
+			} else {
+				r.EncodeMapEnd()
+			}
+		}
+	}
+}
+
+func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	if r.IsContainerType(codecSelverValueTypeMap5311) {
+		yyl23 := r.ReadMapStart()
+		if yyl23 == 0 {
+			r.ReadMapEnd()
+		} else {
+			x.codecDecodeSelfFromMap(yyl23, d)
+		}
+	} else if r.IsContainerType(codecSelverValueTypeArray5311) {
+		yyl23 := r.ReadArrayStart()
+		if yyl23 == 0 {
+			r.ReadArrayEnd()
+		} else {
+			x.codecDecodeSelfFromArray(yyl23, d)
+		}
+	} else {
+		panic(codecSelferOnlyMapOrArrayEncodeToStructErr5311)
+	}
+}
+
+func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	var yys24Slc = z.DecScratchBuffer() // default slice to decode into
+	_ = yys24Slc
+	var yyhl24 bool = l >= 0
+	for yyj24 := 0; ; yyj24++ {
+		if yyhl24 {
+			if yyj24 >= l {
+				break
+			}
+		} else {
+			if r.CheckBreak() {
+				break
+			}
+			if yyj24 > 0 {
+				r.ReadMapEntrySeparator()
+			}
+		}
+		yys24Slc = r.DecodeBytes(yys24Slc, true, true)
+		yys24 := string(yys24Slc)
+		if !yyhl24 {
+			r.ReadMapKVSeparator()
+		}
+		switch yys24 {
+		case "key":
+			if r.TryDecodeAsNil() {
+				x.Key = ""
+			} else {
+				x.Key = string(r.DecodeString())
+			}
+		case "dir":
+			if r.TryDecodeAsNil() {
+				x.Dir = false
+			} else {
+				x.Dir = bool(r.DecodeBool())
+			}
+		case "value":
+			if r.TryDecodeAsNil() {
+				x.Value = ""
+			} else {
+				x.Value = string(r.DecodeString())
+			}
+		case "nodes":
+			if r.TryDecodeAsNil() {
+				x.Nodes = nil
+			} else {
+				yyv28 := &x.Nodes
+				h.decSlicePtrtoNode((*[]*Node)(yyv28), d)
+			}
+		case "createdIndex":
+			if r.TryDecodeAsNil() {
+				x.CreatedIndex = 0
+			} else {
+				x.CreatedIndex = uint64(r.DecodeUint(64))
+			}
+		case "modifiedIndex":
+			if r.TryDecodeAsNil() {
+				x.ModifiedIndex = 0
+			} else {
+				x.ModifiedIndex = uint64(r.DecodeUint(64))
+			}
+		case "expiration":
+			if r.TryDecodeAsNil() {
+				if x.Expiration != nil {
+					x.Expiration = nil
+				}
+			} else {
+				if x.Expiration == nil {
+					x.Expiration = new(time.Time)
+				}
+				z.DecFallback(x.Expiration, false)
+			}
+		case "ttl":
+			if r.TryDecodeAsNil() {
+				x.TTL = 0
+			} else {
+				x.TTL = int64(r.DecodeInt(64))
+			}
+		default:
+			z.DecStructFieldNotFound(-1, yys24)
+		} // end switch yys24
+	} // end for yyj24
+	if !yyhl24 {
+		r.ReadMapEnd()
+	}
+}
+
+func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+	var yyj33 int
+	var yyb33 bool
+	var yyhl33 bool = l >= 0
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	if r.TryDecodeAsNil() {
+		x.Key = ""
+	} else {
+		x.Key = string(r.DecodeString())
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.Dir = false
+	} else {
+		x.Dir = bool(r.DecodeBool())
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.Value = ""
+	} else {
+		x.Value = string(r.DecodeString())
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.Nodes = nil
+	} else {
+		yyv37 := &x.Nodes
+		h.decSlicePtrtoNode((*[]*Node)(yyv37), d)
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.CreatedIndex = 0
+	} else {
+		x.CreatedIndex = uint64(r.DecodeUint(64))
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.ModifiedIndex = 0
+	} else {
+		x.ModifiedIndex = uint64(r.DecodeUint(64))
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		if x.Expiration != nil {
+			x.Expiration = nil
+		}
+	} else {
+		if x.Expiration == nil {
+			x.Expiration = new(time.Time)
+		}
+		z.DecFallback(x.Expiration, false)
+	}
+	yyj33++
+	if yyhl33 {
+		yyb33 = yyj33 > l
+	} else {
+		yyb33 = r.CheckBreak()
+	}
+	if yyb33 {
+		r.ReadArrayEnd()
+		return
+	}
+	r.ReadArrayEntrySeparator()
+	if r.TryDecodeAsNil() {
+		x.TTL = 0
+	} else {
+		x.TTL = int64(r.DecodeInt(64))
+	}
+	for {
+		yyj33++
+		if yyhl33 {
+			yyb33 = yyj33 > l
+		} else {
+			yyb33 = r.CheckBreak()
+		}
+		if yyb33 {
+			break
+		}
+		if yyj33 > 1 {
+			r.ReadArrayEntrySeparator()
+		}
+		z.DecStructFieldNotFound(yyj33-1, "")
+	}
+	r.ReadArrayEnd()
+}
+
+func (x codecSelfer5311) encSlicePtrtoNode(v []*Node, e *codec1978.Encoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperEncoder(e)
+	_, _, _ = h, z, r
+	r.EncodeArrayStart(len(v))
+	yys42 := !z.EncBinary()
+	if yys42 {
+		for yyi42, yyv42 := range v {
+			if yyi42 > 0 {
+				r.EncodeArrayEntrySeparator()
+			}
+			if yyv42 == nil {
+				r.EncodeNil()
+			} else {
+				yyv42.CodecEncodeSelf(e)
+			}
+		}
+		r.EncodeArrayEnd()
+	} else {
+		for _, yyv42 := range v {
+			if yyv42 == nil {
+				r.EncodeNil()
+			} else {
+				yyv42.CodecEncodeSelf(e)
+			}
+		}
+	}
+}
+
+func (x codecSelfer5311) decSlicePtrtoNode(v *[]*Node, d *codec1978.Decoder) {
+	var h codecSelfer5311
+	z, r := codec1978.GenHelperDecoder(d)
+	_, _, _ = h, z, r
+
+	yyv43 := *v
+	yyh43, yyl43 := z.DecSliceHelperStart()
+
+	var yyc43 bool
+	_ = yyc43
+
+	if yyv43 == nil {
+		if yyl43 <= 0 {
+			yyv43 = make([]*Node, 0)
+		} else {
+			yyv43 = make([]*Node, yyl43)
+		}
+		yyc43 = true
+	}
+
+	if yyl43 == 0 {
+		if len(yyv43) != 0 {
+			yyv43 = yyv43[:0]
+			yyc43 = true
+		}
+	} else if yyl43 > 0 {
+
+		yyn43 := yyl43
+		if yyl43 > cap(yyv43) {
+			yyv43 = make([]*Node, yyl43, yyl43)
+			yyc43 = true
+
+		} else if yyl43 != len(yyv43) {
+			yyv43 = yyv43[:yyl43]
+			yyc43 = true
+		}
+		yyj43 := 0
+		for ; yyj43 < yyn43; yyj43++ {
+			if r.TryDecodeAsNil() {
+				if yyv43[yyj43] != nil {
+					*yyv43[yyj43] = Node{}
+				}
+			} else {
+				if yyv43[yyj43] == nil {
+					yyv43[yyj43] = new(Node)
+				}
+				yyw44 := yyv43[yyj43]
+				yyw44.CodecDecodeSelf(d)
+			}
+
+		}
+
+	} else {
+		for yyj43 := 0; !r.CheckBreak(); yyj43++ {
+			if yyj43 >= len(yyv43) {
+				yyv43 = append(yyv43, nil) // var yyz43 *Node
+				yyc43 = true
+			}
+			if yyj43 > 0 {
+				yyh43.Sep(yyj43)
+			}
+
+			if yyj43 < len(yyv43) {
+				if r.TryDecodeAsNil() {
+					if yyv43[yyj43] != nil {
+						*yyv43[yyj43] = Node{}
+					}
+				} else {
+					if yyv43[yyj43] == nil {
+						yyv43[yyj43] = new(Node)
+					}
+					yyw45 := yyv43[yyj43]
+					yyw45.CodecDecodeSelf(d)
+				}
+
+			} else {
+				z.DecSwallow()
+			}
+
+		}
+		yyh43.End()
+	}
+	if yyc43 {
+		*v = yyv43
+	}
+
+}

+ 644 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go

@@ -0,0 +1,644 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+//go:generate codecgen -r "Node|Response" -o keys.generated.go keys.go
+
+import (
+	"encoding/json"
+	"errors"
+	"fmt"
+	"net/http"
+	"net/url"
+	"strconv"
+	"strings"
+	"time"
+
+	"github.com/coreos/etcd/pkg/pathutil"
+	"github.com/ugorji/go/codec"
+	"golang.org/x/net/context"
+)
+
+const (
+	ErrorCodeKeyNotFound  = 100
+	ErrorCodeTestFailed   = 101
+	ErrorCodeNotFile      = 102
+	ErrorCodeNotDir       = 104
+	ErrorCodeNodeExist    = 105
+	ErrorCodeRootROnly    = 107
+	ErrorCodeDirNotEmpty  = 108
+	ErrorCodeUnauthorized = 110
+
+	ErrorCodePrevValueRequired = 201
+	ErrorCodeTTLNaN            = 202
+	ErrorCodeIndexNaN          = 203
+	ErrorCodeInvalidField      = 209
+	ErrorCodeInvalidForm       = 210
+
+	ErrorCodeRaftInternal = 300
+	ErrorCodeLeaderElect  = 301
+
+	ErrorCodeWatcherCleared    = 400
+	ErrorCodeEventIndexCleared = 401
+)
+
+type Error struct {
+	Code    int    `json:"errorCode"`
+	Message string `json:"message"`
+	Cause   string `json:"cause"`
+	Index   uint64 `json:"index"`
+}
+
+func (e Error) Error() string {
+	return fmt.Sprintf("%v: %v (%v) [%v]", e.Code, e.Message, e.Cause, e.Index)
+}
+
+var (
+	ErrInvalidJSON = errors.New("client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.")
+	ErrEmptyBody   = errors.New("client: response body is empty")
+)
+
+// PrevExistType is used to define an existence condition when setting
+// or deleting Nodes.
+type PrevExistType string
+
+const (
+	PrevIgnore  = PrevExistType("")
+	PrevExist   = PrevExistType("true")
+	PrevNoExist = PrevExistType("false")
+)
+
+var (
+	defaultV2KeysPrefix = "/v2/keys"
+)
+
+// NewKeysAPI builds a KeysAPI that interacts with etcd's key-value
+// API over HTTP.
+func NewKeysAPI(c Client) KeysAPI {
+	return NewKeysAPIWithPrefix(c, defaultV2KeysPrefix)
+}
+
+// NewKeysAPIWithPrefix acts like NewKeysAPI, but allows the caller
+// to provide a custom base URL path. This should only be used in
+// very rare cases.
+func NewKeysAPIWithPrefix(c Client, p string) KeysAPI {
+	return &httpKeysAPI{
+		client: c,
+		prefix: p,
+	}
+}
+
+type KeysAPI interface {
+	// Get retrieves a set of Nodes from etcd
+	Get(ctx context.Context, key string, opts *GetOptions) (*Response, error)
+
+	// Set assigns a new value to a Node identified by a given key. The caller
+	// may define a set of conditions in the SetOptions. If SetOptions.Dir=true
+	// than value is ignored.
+	Set(ctx context.Context, key, value string, opts *SetOptions) (*Response, error)
+
+	// Delete removes a Node identified by the given key, optionally destroying
+	// all of its children as well. The caller may define a set of required
+	// conditions in an DeleteOptions object.
+	Delete(ctx context.Context, key string, opts *DeleteOptions) (*Response, error)
+
+	// Create is an alias for Set w/ PrevExist=false
+	Create(ctx context.Context, key, value string) (*Response, error)
+
+	// CreateInOrder is used to atomically create in-order keys within the given directory.
+	CreateInOrder(ctx context.Context, dir, value string, opts *CreateInOrderOptions) (*Response, error)
+
+	// Update is an alias for Set w/ PrevExist=true
+	Update(ctx context.Context, key, value string) (*Response, error)
+
+	// Watcher builds a new Watcher targeted at a specific Node identified
+	// by the given key. The Watcher may be configured at creation time
+	// through a WatcherOptions object. The returned Watcher is designed
+	// to emit events that happen to a Node, and optionally to its children.
+	Watcher(key string, opts *WatcherOptions) Watcher
+}
+
+type WatcherOptions struct {
+	// AfterIndex defines the index after-which the Watcher should
+	// start emitting events. For example, if a value of 5 is
+	// provided, the first event will have an index >= 6.
+	//
+	// Setting AfterIndex to 0 (default) means that the Watcher
+	// should start watching for events starting at the current
+	// index, whatever that may be.
+	AfterIndex uint64
+
+	// Recursive specifies whether or not the Watcher should emit
+	// events that occur in children of the given keyspace. If set
+	// to false (default), events will be limited to those that
+	// occur for the exact key.
+	Recursive bool
+}
+
+type CreateInOrderOptions struct {
+	// TTL defines a period of time after-which the Node should
+	// expire and no longer exist. Values <= 0 are ignored. Given
+	// that the zero-value is ignored, TTL cannot be used to set
+	// a TTL of 0.
+	TTL time.Duration
+}
+
+type SetOptions struct {
+	// PrevValue specifies what the current value of the Node must
+	// be in order for the Set operation to succeed.
+	//
+	// Leaving this field empty means that the caller wishes to
+	// ignore the current value of the Node. This cannot be used
+	// to compare the Node's current value to an empty string.
+	//
+	// PrevValue is ignored if Dir=true
+	PrevValue string
+
+	// PrevIndex indicates what the current ModifiedIndex of the
+	// Node must be in order for the Set operation to succeed.
+	//
+	// If PrevIndex is set to 0 (default), no comparison is made.
+	PrevIndex uint64
+
+	// PrevExist specifies whether the Node must currently exist
+	// (PrevExist) or not (PrevNoExist). If the caller does not
+	// care about existence, set PrevExist to PrevIgnore, or simply
+	// leave it unset.
+	PrevExist PrevExistType
+
+	// TTL defines a period of time after-which the Node should
+	// expire and no longer exist. Values <= 0 are ignored. Given
+	// that the zero-value is ignored, TTL cannot be used to set
+	// a TTL of 0.
+	TTL time.Duration
+
+	// Dir specifies whether or not this Node should be created as a directory.
+	Dir bool
+}
+
+type GetOptions struct {
+	// Recursive defines whether or not all children of the Node
+	// should be returned.
+	Recursive bool
+
+	// Sort instructs the server whether or not to sort the Nodes.
+	// If true, the Nodes are sorted alphabetically by key in
+	// ascending order (A to z). If false (default), the Nodes will
+	// not be sorted and the ordering used should not be considered
+	// predictable.
+	Sort bool
+
+	// Quorum specifies whether it gets the latest committed value that
+	// has been applied in quorum of members, which ensures external
+	// consistency (or linearizability).
+	Quorum bool
+}
+
+type DeleteOptions struct {
+	// PrevValue specifies what the current value of the Node must
+	// be in order for the Delete operation to succeed.
+	//
+	// Leaving this field empty means that the caller wishes to
+	// ignore the current value of the Node. This cannot be used
+	// to compare the Node's current value to an empty string.
+	PrevValue string
+
+	// PrevIndex indicates what the current ModifiedIndex of the
+	// Node must be in order for the Delete operation to succeed.
+	//
+	// If PrevIndex is set to 0 (default), no comparison is made.
+	PrevIndex uint64
+
+	// Recursive defines whether or not all children of the Node
+	// should be deleted. If set to true, all children of the Node
+	// identified by the given key will be deleted. If left unset
+	// or explicitly set to false, only a single Node will be
+	// deleted.
+	Recursive bool
+
+	// Dir specifies whether or not this Node should be removed as a directory.
+	Dir bool
+}
+
+type Watcher interface {
+	// Next blocks until an etcd event occurs, then returns a Response
+	// represeting that event. The behavior of Next depends on the
+	// WatcherOptions used to construct the Watcher. Next is designed to
+	// be called repeatedly, each time blocking until a subsequent event
+	// is available.
+	//
+	// If the provided context is cancelled, Next will return a non-nil
+	// error. Any other failures encountered while waiting for the next
+	// event (connection issues, deserialization failures, etc) will
+	// also result in a non-nil error.
+	Next(context.Context) (*Response, error)
+}
+
+type Response struct {
+	// Action is the name of the operation that occurred. Possible values
+	// include get, set, delete, update, create, compareAndSwap,
+	// compareAndDelete and expire.
+	Action string `json:"action"`
+
+	// Node represents the state of the relevant etcd Node.
+	Node *Node `json:"node"`
+
+	// PrevNode represents the previous state of the Node. PrevNode is non-nil
+	// only if the Node existed before the action occurred and the action
+	// caused a change to the Node.
+	PrevNode *Node `json:"prevNode"`
+
+	// Index holds the cluster-level index at the time the Response was generated.
+	// This index is not tied to the Node(s) contained in this Response.
+	Index uint64 `json:"-"`
+}
+
+type Node struct {
+	// Key represents the unique location of this Node (e.g. "/foo/bar").
+	Key string `json:"key"`
+
+	// Dir reports whether node describes a directory.
+	Dir bool `json:"dir,omitempty"`
+
+	// Value is the current data stored on this Node. If this Node
+	// is a directory, Value will be empty.
+	Value string `json:"value"`
+
+	// Nodes holds the children of this Node, only if this Node is a directory.
+	// This slice of will be arbitrarily deep (children, grandchildren, great-
+	// grandchildren, etc.) if a recursive Get or Watch request were made.
+	Nodes []*Node `json:"nodes"`
+
+	// CreatedIndex is the etcd index at-which this Node was created.
+	CreatedIndex uint64 `json:"createdIndex"`
+
+	// ModifiedIndex is the etcd index at-which this Node was last modified.
+	ModifiedIndex uint64 `json:"modifiedIndex"`
+
+	// Expiration is the server side expiration time of the key.
+	Expiration *time.Time `json:"expiration,omitempty"`
+
+	// TTL is the time to live of the key in second.
+	TTL int64 `json:"ttl,omitempty"`
+}
+
+func (n *Node) String() string {
+	return fmt.Sprintf("{Key: %s, CreatedIndex: %d, ModifiedIndex: %d, TTL: %d}", n.Key, n.CreatedIndex, n.ModifiedIndex, n.TTL)
+}
+
+// TTLDuration returns the Node's TTL as a time.Duration object
+func (n *Node) TTLDuration() time.Duration {
+	return time.Duration(n.TTL) * time.Second
+}
+
+type httpKeysAPI struct {
+	client httpClient
+	prefix string
+}
+
+func (k *httpKeysAPI) Set(ctx context.Context, key, val string, opts *SetOptions) (*Response, error) {
+	act := &setAction{
+		Prefix: k.prefix,
+		Key:    key,
+		Value:  val,
+	}
+
+	if opts != nil {
+		act.PrevValue = opts.PrevValue
+		act.PrevIndex = opts.PrevIndex
+		act.PrevExist = opts.PrevExist
+		act.TTL = opts.TTL
+		act.Dir = opts.Dir
+	}
+
+	resp, body, err := k.client.Do(ctx, act)
+	if err != nil {
+		return nil, err
+	}
+
+	return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body)
+}
+
+func (k *httpKeysAPI) Create(ctx context.Context, key, val string) (*Response, error) {
+	return k.Set(ctx, key, val, &SetOptions{PrevExist: PrevNoExist})
+}
+
+func (k *httpKeysAPI) CreateInOrder(ctx context.Context, dir, val string, opts *CreateInOrderOptions) (*Response, error) {
+	act := &createInOrderAction{
+		Prefix: k.prefix,
+		Dir:    dir,
+		Value:  val,
+	}
+
+	if opts != nil {
+		act.TTL = opts.TTL
+	}
+
+	resp, body, err := k.client.Do(ctx, act)
+	if err != nil {
+		return nil, err
+	}
+
+	return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body)
+}
+
+func (k *httpKeysAPI) Update(ctx context.Context, key, val string) (*Response, error) {
+	return k.Set(ctx, key, val, &SetOptions{PrevExist: PrevExist})
+}
+
+func (k *httpKeysAPI) Delete(ctx context.Context, key string, opts *DeleteOptions) (*Response, error) {
+	act := &deleteAction{
+		Prefix: k.prefix,
+		Key:    key,
+	}
+
+	if opts != nil {
+		act.PrevValue = opts.PrevValue
+		act.PrevIndex = opts.PrevIndex
+		act.Dir = opts.Dir
+		act.Recursive = opts.Recursive
+	}
+
+	resp, body, err := k.client.Do(ctx, act)
+	if err != nil {
+		return nil, err
+	}
+
+	return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body)
+}
+
+func (k *httpKeysAPI) Get(ctx context.Context, key string, opts *GetOptions) (*Response, error) {
+	act := &getAction{
+		Prefix: k.prefix,
+		Key:    key,
+	}
+
+	if opts != nil {
+		act.Recursive = opts.Recursive
+		act.Sorted = opts.Sort
+		act.Quorum = opts.Quorum
+	}
+
+	resp, body, err := k.client.Do(ctx, act)
+	if err != nil {
+		return nil, err
+	}
+
+	return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body)
+}
+
+func (k *httpKeysAPI) Watcher(key string, opts *WatcherOptions) Watcher {
+	act := waitAction{
+		Prefix: k.prefix,
+		Key:    key,
+	}
+
+	if opts != nil {
+		act.Recursive = opts.Recursive
+		if opts.AfterIndex > 0 {
+			act.WaitIndex = opts.AfterIndex + 1
+		}
+	}
+
+	return &httpWatcher{
+		client:   k.client,
+		nextWait: act,
+	}
+}
+
+type httpWatcher struct {
+	client   httpClient
+	nextWait waitAction
+}
+
+func (hw *httpWatcher) Next(ctx context.Context) (*Response, error) {
+	for {
+		httpresp, body, err := hw.client.Do(ctx, &hw.nextWait)
+		if err != nil {
+			return nil, err
+		}
+
+		resp, err := unmarshalHTTPResponse(httpresp.StatusCode, httpresp.Header, body)
+		if err != nil {
+			if err == ErrEmptyBody {
+				continue
+			}
+			return nil, err
+		}
+
+		hw.nextWait.WaitIndex = resp.Node.ModifiedIndex + 1
+		return resp, nil
+	}
+}
+
+// v2KeysURL forms a URL representing the location of a key.
+// The endpoint argument represents the base URL of an etcd
+// server. The prefix is the path needed to route from the
+// provided endpoint's path to the root of the keys API
+// (typically "/v2/keys").
+func v2KeysURL(ep url.URL, prefix, key string) *url.URL {
+	// We concatenate all parts together manually. We cannot use
+	// path.Join because it does not reserve trailing slash.
+	// We call CanonicalURLPath to further cleanup the path.
+	if prefix != "" && prefix[0] != '/' {
+		prefix = "/" + prefix
+	}
+	if key != "" && key[0] != '/' {
+		key = "/" + key
+	}
+	ep.Path = pathutil.CanonicalURLPath(ep.Path + prefix + key)
+	return &ep
+}
+
+type getAction struct {
+	Prefix    string
+	Key       string
+	Recursive bool
+	Sorted    bool
+	Quorum    bool
+}
+
+func (g *getAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2KeysURL(ep, g.Prefix, g.Key)
+
+	params := u.Query()
+	params.Set("recursive", strconv.FormatBool(g.Recursive))
+	params.Set("sorted", strconv.FormatBool(g.Sorted))
+	params.Set("quorum", strconv.FormatBool(g.Quorum))
+	u.RawQuery = params.Encode()
+
+	req, _ := http.NewRequest("GET", u.String(), nil)
+	return req
+}
+
+type waitAction struct {
+	Prefix    string
+	Key       string
+	WaitIndex uint64
+	Recursive bool
+}
+
+func (w *waitAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2KeysURL(ep, w.Prefix, w.Key)
+
+	params := u.Query()
+	params.Set("wait", "true")
+	params.Set("waitIndex", strconv.FormatUint(w.WaitIndex, 10))
+	params.Set("recursive", strconv.FormatBool(w.Recursive))
+	u.RawQuery = params.Encode()
+
+	req, _ := http.NewRequest("GET", u.String(), nil)
+	return req
+}
+
+type setAction struct {
+	Prefix    string
+	Key       string
+	Value     string
+	PrevValue string
+	PrevIndex uint64
+	PrevExist PrevExistType
+	TTL       time.Duration
+	Dir       bool
+}
+
+func (a *setAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2KeysURL(ep, a.Prefix, a.Key)
+
+	params := u.Query()
+	form := url.Values{}
+
+	// we're either creating a directory or setting a key
+	if a.Dir {
+		params.Set("dir", strconv.FormatBool(a.Dir))
+	} else {
+		// These options are only valid for setting a key
+		if a.PrevValue != "" {
+			params.Set("prevValue", a.PrevValue)
+		}
+		form.Add("value", a.Value)
+	}
+
+	// Options which apply to both setting a key and creating a dir
+	if a.PrevIndex != 0 {
+		params.Set("prevIndex", strconv.FormatUint(a.PrevIndex, 10))
+	}
+	if a.PrevExist != PrevIgnore {
+		params.Set("prevExist", string(a.PrevExist))
+	}
+	if a.TTL > 0 {
+		form.Add("ttl", strconv.FormatUint(uint64(a.TTL.Seconds()), 10))
+	}
+
+	u.RawQuery = params.Encode()
+	body := strings.NewReader(form.Encode())
+
+	req, _ := http.NewRequest("PUT", u.String(), body)
+	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+
+	return req
+}
+
+type deleteAction struct {
+	Prefix    string
+	Key       string
+	PrevValue string
+	PrevIndex uint64
+	Dir       bool
+	Recursive bool
+}
+
+func (a *deleteAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2KeysURL(ep, a.Prefix, a.Key)
+
+	params := u.Query()
+	if a.PrevValue != "" {
+		params.Set("prevValue", a.PrevValue)
+	}
+	if a.PrevIndex != 0 {
+		params.Set("prevIndex", strconv.FormatUint(a.PrevIndex, 10))
+	}
+	if a.Dir {
+		params.Set("dir", "true")
+	}
+	if a.Recursive {
+		params.Set("recursive", "true")
+	}
+	u.RawQuery = params.Encode()
+
+	req, _ := http.NewRequest("DELETE", u.String(), nil)
+	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+
+	return req
+}
+
+type createInOrderAction struct {
+	Prefix string
+	Dir    string
+	Value  string
+	TTL    time.Duration
+}
+
+func (a *createInOrderAction) HTTPRequest(ep url.URL) *http.Request {
+	u := v2KeysURL(ep, a.Prefix, a.Dir)
+
+	form := url.Values{}
+	form.Add("value", a.Value)
+	if a.TTL > 0 {
+		form.Add("ttl", strconv.FormatUint(uint64(a.TTL.Seconds()), 10))
+	}
+	body := strings.NewReader(form.Encode())
+
+	req, _ := http.NewRequest("POST", u.String(), body)
+	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+	return req
+}
+
+func unmarshalHTTPResponse(code int, header http.Header, body []byte) (res *Response, err error) {
+	switch code {
+	case http.StatusOK, http.StatusCreated:
+		if len(body) == 0 {
+			return nil, ErrEmptyBody
+		}
+		res, err = unmarshalSuccessfulKeysResponse(header, body)
+	default:
+		err = unmarshalFailedKeysResponse(body)
+	}
+
+	return
+}
+
+func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) {
+	var res Response
+	err := codec.NewDecoderBytes(body, new(codec.JsonHandle)).Decode(&res)
+	if err != nil {
+		return nil, ErrInvalidJSON
+	}
+	if header.Get("X-Etcd-Index") != "" {
+		res.Index, err = strconv.ParseUint(header.Get("X-Etcd-Index"), 10, 64)
+		if err != nil {
+			return nil, err
+		}
+	}
+	return &res, nil
+}
+
+func unmarshalFailedKeysResponse(body []byte) error {
+	var etcdErr Error
+	if err := json.Unmarshal(body, &etcdErr); err != nil {
+		return ErrInvalidJSON
+	}
+	return etcdErr
+}

+ 73 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go

@@ -0,0 +1,73 @@
+package client
+
+import (
+	"encoding/json"
+	"net/http"
+	"reflect"
+	"strings"
+	"testing"
+)
+
+func createTestNode(size int) *Node {
+	return &Node{
+		Key:           strings.Repeat("a", 30),
+		Value:         strings.Repeat("a", size),
+		CreatedIndex:  123456,
+		ModifiedIndex: 123456,
+		TTL:           123456789,
+	}
+}
+
+func createTestNodeWithChildren(children, size int) *Node {
+	node := createTestNode(size)
+	for i := 0; i < children; i++ {
+		node.Nodes = append(node.Nodes, createTestNode(size))
+	}
+	return node
+}
+
+func createTestResponse(children, size int) *Response {
+	return &Response{
+		Action:   "aaaaa",
+		Node:     createTestNodeWithChildren(children, size),
+		PrevNode: nil,
+	}
+}
+
+func benchmarkResponseUnmarshalling(b *testing.B, children, size int) {
+	header := http.Header{}
+	header.Add("X-Etcd-Index", "123456")
+	response := createTestResponse(children, size)
+	body, err := json.Marshal(response)
+	if err != nil {
+		b.Fatal(err)
+	}
+
+	b.ResetTimer()
+	newResponse := new(Response)
+	for i := 0; i < b.N; i++ {
+		if newResponse, err = unmarshalSuccessfulKeysResponse(header, body); err != nil {
+			b.Errorf("error unmarshaling response (%v)", err)
+		}
+
+	}
+	if !reflect.DeepEqual(response.Node, newResponse.Node) {
+		b.Errorf("Unexpected difference in a parsed response: \n%+v\n%+v", response, newResponse)
+	}
+}
+
+func BenchmarkSmallResponseUnmarshal(b *testing.B) {
+	benchmarkResponseUnmarshalling(b, 30, 20)
+}
+
+func BenchmarkManySmallResponseUnmarshal(b *testing.B) {
+	benchmarkResponseUnmarshalling(b, 3000, 20)
+}
+
+func BenchmarkMediumResponseUnmarshal(b *testing.B) {
+	benchmarkResponseUnmarshalling(b, 300, 200)
+}
+
+func BenchmarkLargeResponseUnmarshal(b *testing.B) {
+	benchmarkResponseUnmarshalling(b, 3000, 2000)
+}

+ 1407 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go

@@ -0,0 +1,1407 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"errors"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"net/url"
+	"reflect"
+	"testing"
+	"time"
+
+	"golang.org/x/net/context"
+)
+
+func TestV2KeysURLHelper(t *testing.T) {
+	tests := []struct {
+		endpoint url.URL
+		prefix   string
+		key      string
+		want     url.URL
+	}{
+		// key is empty, no problem
+		{
+			endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"},
+			prefix:   "",
+			key:      "",
+			want:     url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"},
+		},
+
+		// key is joined to path
+		{
+			endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"},
+			prefix:   "",
+			key:      "/foo/bar",
+			want:     url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys/foo/bar"},
+		},
+
+		// key is joined to path when path is empty
+		{
+			endpoint: url.URL{Scheme: "http", Host: "example.com", Path: ""},
+			prefix:   "",
+			key:      "/foo/bar",
+			want:     url.URL{Scheme: "http", Host: "example.com", Path: "/foo/bar"},
+		},
+
+		// Host field carries through with port
+		{
+			endpoint: url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"},
+			prefix:   "",
+			key:      "",
+			want:     url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"},
+		},
+
+		// Scheme carries through
+		{
+			endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"},
+			prefix:   "",
+			key:      "",
+			want:     url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"},
+		},
+		// Prefix is applied
+		{
+			endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"},
+			prefix:   "/bar",
+			key:      "/baz",
+			want:     url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz"},
+		},
+		// Prefix is joined to path
+		{
+			endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"},
+			prefix:   "/bar",
+			key:      "",
+			want:     url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar"},
+		},
+		// Keep trailing slash
+		{
+			endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"},
+			prefix:   "/bar",
+			key:      "/baz/",
+			want:     url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz/"},
+		},
+	}
+
+	for i, tt := range tests {
+		got := v2KeysURL(tt.endpoint, tt.prefix, tt.key)
+		if tt.want != *got {
+			t.Errorf("#%d: want=%#v, got=%#v", i, tt.want, *got)
+		}
+	}
+}
+
+func TestGetAction(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}
+	baseWantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/keys/foo/bar",
+	}
+	wantHeader := http.Header{}
+
+	tests := []struct {
+		recursive bool
+		sorted    bool
+		quorum    bool
+		wantQuery string
+	}{
+		{
+			recursive: false,
+			sorted:    false,
+			quorum:    false,
+			wantQuery: "quorum=false&recursive=false&sorted=false",
+		},
+		{
+			recursive: true,
+			sorted:    false,
+			quorum:    false,
+			wantQuery: "quorum=false&recursive=true&sorted=false",
+		},
+		{
+			recursive: false,
+			sorted:    true,
+			quorum:    false,
+			wantQuery: "quorum=false&recursive=false&sorted=true",
+		},
+		{
+			recursive: true,
+			sorted:    true,
+			quorum:    false,
+			wantQuery: "quorum=false&recursive=true&sorted=true",
+		},
+		{
+			recursive: false,
+			sorted:    false,
+			quorum:    true,
+			wantQuery: "quorum=true&recursive=false&sorted=false",
+		},
+	}
+
+	for i, tt := range tests {
+		f := getAction{
+			Key:       "/foo/bar",
+			Recursive: tt.recursive,
+			Sorted:    tt.sorted,
+			Quorum:    tt.quorum,
+		}
+		got := *f.HTTPRequest(ep)
+
+		wantURL := baseWantURL
+		wantURL.RawQuery = tt.wantQuery
+
+		err := assertRequest(got, "GET", wantURL, wantHeader, nil)
+		if err != nil {
+			t.Errorf("#%d: %v", i, err)
+		}
+	}
+}
+
+func TestWaitAction(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}
+	baseWantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/keys/foo/bar",
+	}
+	wantHeader := http.Header{}
+
+	tests := []struct {
+		waitIndex uint64
+		recursive bool
+		wantQuery string
+	}{
+		{
+			recursive: false,
+			waitIndex: uint64(0),
+			wantQuery: "recursive=false&wait=true&waitIndex=0",
+		},
+		{
+			recursive: false,
+			waitIndex: uint64(12),
+			wantQuery: "recursive=false&wait=true&waitIndex=12",
+		},
+		{
+			recursive: true,
+			waitIndex: uint64(12),
+			wantQuery: "recursive=true&wait=true&waitIndex=12",
+		},
+	}
+
+	for i, tt := range tests {
+		f := waitAction{
+			Key:       "/foo/bar",
+			WaitIndex: tt.waitIndex,
+			Recursive: tt.recursive,
+		}
+		got := *f.HTTPRequest(ep)
+
+		wantURL := baseWantURL
+		wantURL.RawQuery = tt.wantQuery
+
+		err := assertRequest(got, "GET", wantURL, wantHeader, nil)
+		if err != nil {
+			t.Errorf("#%d: unexpected error: %#v", i, err)
+		}
+	}
+}
+
+func TestSetAction(t *testing.T) {
+	wantHeader := http.Header(map[string][]string{
+		"Content-Type": {"application/x-www-form-urlencoded"},
+	})
+
+	tests := []struct {
+		act      setAction
+		wantURL  string
+		wantBody string
+	}{
+		// default prefix
+		{
+			act: setAction{
+				Prefix: defaultV2KeysPrefix,
+				Key:    "foo",
+			},
+			wantURL:  "http://example.com/v2/keys/foo",
+			wantBody: "value=",
+		},
+
+		// non-default prefix
+		{
+			act: setAction{
+				Prefix: "/pfx",
+				Key:    "foo",
+			},
+			wantURL:  "http://example.com/pfx/foo",
+			wantBody: "value=",
+		},
+
+		// no prefix
+		{
+			act: setAction{
+				Key: "foo",
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "value=",
+		},
+
+		// Key with path separators
+		{
+			act: setAction{
+				Prefix: defaultV2KeysPrefix,
+				Key:    "foo/bar/baz",
+			},
+			wantURL:  "http://example.com/v2/keys/foo/bar/baz",
+			wantBody: "value=",
+		},
+
+		// Key with leading slash, Prefix with trailing slash
+		{
+			act: setAction{
+				Prefix: "/foo/",
+				Key:    "/bar",
+			},
+			wantURL:  "http://example.com/foo/bar",
+			wantBody: "value=",
+		},
+
+		// Key with trailing slash
+		{
+			act: setAction{
+				Key: "/foo/",
+			},
+			wantURL:  "http://example.com/foo/",
+			wantBody: "value=",
+		},
+
+		// Value is set
+		{
+			act: setAction{
+				Key:   "foo",
+				Value: "baz",
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "value=baz",
+		},
+
+		// PrevExist set, but still ignored
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevExist: PrevIgnore,
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "value=",
+		},
+
+		// PrevExist set to true
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevExist: PrevExist,
+			},
+			wantURL:  "http://example.com/foo?prevExist=true",
+			wantBody: "value=",
+		},
+
+		// PrevExist set to false
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevExist: PrevNoExist,
+			},
+			wantURL:  "http://example.com/foo?prevExist=false",
+			wantBody: "value=",
+		},
+
+		// PrevValue is urlencoded
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevValue: "bar baz",
+			},
+			wantURL:  "http://example.com/foo?prevValue=bar+baz",
+			wantBody: "value=",
+		},
+
+		// PrevIndex is set
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevIndex: uint64(12),
+			},
+			wantURL:  "http://example.com/foo?prevIndex=12",
+			wantBody: "value=",
+		},
+
+		// TTL is set
+		{
+			act: setAction{
+				Key: "foo",
+				TTL: 3 * time.Minute,
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "ttl=180&value=",
+		},
+		// Dir is set
+		{
+			act: setAction{
+				Key: "foo",
+				Dir: true,
+			},
+			wantURL:  "http://example.com/foo?dir=true",
+			wantBody: "",
+		},
+		// Dir is set with a value
+		{
+			act: setAction{
+				Key:   "foo",
+				Value: "bar",
+				Dir:   true,
+			},
+			wantURL:  "http://example.com/foo?dir=true",
+			wantBody: "",
+		},
+		// Dir is set with PrevExist set to true
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevExist: PrevExist,
+				Dir:       true,
+			},
+			wantURL:  "http://example.com/foo?dir=true&prevExist=true",
+			wantBody: "",
+		},
+		// Dir is set with PrevValue
+		{
+			act: setAction{
+				Key:       "foo",
+				PrevValue: "bar",
+				Dir:       true,
+			},
+			wantURL:  "http://example.com/foo?dir=true",
+			wantBody: "",
+		},
+	}
+
+	for i, tt := range tests {
+		u, err := url.Parse(tt.wantURL)
+		if err != nil {
+			t.Errorf("#%d: unable to use wantURL fixture: %v", i, err)
+		}
+
+		got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"})
+		if err := assertRequest(*got, "PUT", u, wantHeader, []byte(tt.wantBody)); err != nil {
+			t.Errorf("#%d: %v", i, err)
+		}
+	}
+}
+
+func TestCreateInOrderAction(t *testing.T) {
+	wantHeader := http.Header(map[string][]string{
+		"Content-Type": {"application/x-www-form-urlencoded"},
+	})
+
+	tests := []struct {
+		act      createInOrderAction
+		wantURL  string
+		wantBody string
+	}{
+		// default prefix
+		{
+			act: createInOrderAction{
+				Prefix: defaultV2KeysPrefix,
+				Dir:    "foo",
+			},
+			wantURL:  "http://example.com/v2/keys/foo",
+			wantBody: "value=",
+		},
+
+		// non-default prefix
+		{
+			act: createInOrderAction{
+				Prefix: "/pfx",
+				Dir:    "foo",
+			},
+			wantURL:  "http://example.com/pfx/foo",
+			wantBody: "value=",
+		},
+
+		// no prefix
+		{
+			act: createInOrderAction{
+				Dir: "foo",
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "value=",
+		},
+
+		// Key with path separators
+		{
+			act: createInOrderAction{
+				Prefix: defaultV2KeysPrefix,
+				Dir:    "foo/bar/baz",
+			},
+			wantURL:  "http://example.com/v2/keys/foo/bar/baz",
+			wantBody: "value=",
+		},
+
+		// Key with leading slash, Prefix with trailing slash
+		{
+			act: createInOrderAction{
+				Prefix: "/foo/",
+				Dir:    "/bar",
+			},
+			wantURL:  "http://example.com/foo/bar",
+			wantBody: "value=",
+		},
+
+		// Key with trailing slash
+		{
+			act: createInOrderAction{
+				Dir: "/foo/",
+			},
+			wantURL:  "http://example.com/foo/",
+			wantBody: "value=",
+		},
+
+		// Value is set
+		{
+			act: createInOrderAction{
+				Dir:   "foo",
+				Value: "baz",
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "value=baz",
+		},
+		// TTL is set
+		{
+			act: createInOrderAction{
+				Dir: "foo",
+				TTL: 3 * time.Minute,
+			},
+			wantURL:  "http://example.com/foo",
+			wantBody: "ttl=180&value=",
+		},
+	}
+
+	for i, tt := range tests {
+		u, err := url.Parse(tt.wantURL)
+		if err != nil {
+			t.Errorf("#%d: unable to use wantURL fixture: %v", i, err)
+		}
+
+		got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"})
+		if err := assertRequest(*got, "POST", u, wantHeader, []byte(tt.wantBody)); err != nil {
+			t.Errorf("#%d: %v", i, err)
+		}
+	}
+}
+
+func TestDeleteAction(t *testing.T) {
+	wantHeader := http.Header(map[string][]string{
+		"Content-Type": {"application/x-www-form-urlencoded"},
+	})
+
+	tests := []struct {
+		act     deleteAction
+		wantURL string
+	}{
+		// default prefix
+		{
+			act: deleteAction{
+				Prefix: defaultV2KeysPrefix,
+				Key:    "foo",
+			},
+			wantURL: "http://example.com/v2/keys/foo",
+		},
+
+		// non-default prefix
+		{
+			act: deleteAction{
+				Prefix: "/pfx",
+				Key:    "foo",
+			},
+			wantURL: "http://example.com/pfx/foo",
+		},
+
+		// no prefix
+		{
+			act: deleteAction{
+				Key: "foo",
+			},
+			wantURL: "http://example.com/foo",
+		},
+
+		// Key with path separators
+		{
+			act: deleteAction{
+				Prefix: defaultV2KeysPrefix,
+				Key:    "foo/bar/baz",
+			},
+			wantURL: "http://example.com/v2/keys/foo/bar/baz",
+		},
+
+		// Key with leading slash, Prefix with trailing slash
+		{
+			act: deleteAction{
+				Prefix: "/foo/",
+				Key:    "/bar",
+			},
+			wantURL: "http://example.com/foo/bar",
+		},
+
+		// Key with trailing slash
+		{
+			act: deleteAction{
+				Key: "/foo/",
+			},
+			wantURL: "http://example.com/foo/",
+		},
+
+		// Recursive set to true
+		{
+			act: deleteAction{
+				Key:       "foo",
+				Recursive: true,
+			},
+			wantURL: "http://example.com/foo?recursive=true",
+		},
+
+		// PrevValue is urlencoded
+		{
+			act: deleteAction{
+				Key:       "foo",
+				PrevValue: "bar baz",
+			},
+			wantURL: "http://example.com/foo?prevValue=bar+baz",
+		},
+
+		// PrevIndex is set
+		{
+			act: deleteAction{
+				Key:       "foo",
+				PrevIndex: uint64(12),
+			},
+			wantURL: "http://example.com/foo?prevIndex=12",
+		},
+	}
+
+	for i, tt := range tests {
+		u, err := url.Parse(tt.wantURL)
+		if err != nil {
+			t.Errorf("#%d: unable to use wantURL fixture: %v", i, err)
+		}
+
+		got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"})
+		if err := assertRequest(*got, "DELETE", u, wantHeader, nil); err != nil {
+			t.Errorf("#%d: %v", i, err)
+		}
+	}
+}
+
+func assertRequest(got http.Request, wantMethod string, wantURL *url.URL, wantHeader http.Header, wantBody []byte) error {
+	if wantMethod != got.Method {
+		return fmt.Errorf("want.Method=%#v got.Method=%#v", wantMethod, got.Method)
+	}
+
+	if !reflect.DeepEqual(wantURL, got.URL) {
+		return fmt.Errorf("want.URL=%#v got.URL=%#v", wantURL, got.URL)
+	}
+
+	if !reflect.DeepEqual(wantHeader, got.Header) {
+		return fmt.Errorf("want.Header=%#v got.Header=%#v", wantHeader, got.Header)
+	}
+
+	if got.Body == nil {
+		if wantBody != nil {
+			return fmt.Errorf("want.Body=%v got.Body=%v", wantBody, got.Body)
+		}
+	} else {
+		if wantBody == nil {
+			return fmt.Errorf("want.Body=%v got.Body=%s", wantBody, got.Body)
+		} else {
+			gotBytes, err := ioutil.ReadAll(got.Body)
+			if err != nil {
+				return err
+			}
+
+			if !reflect.DeepEqual(wantBody, gotBytes) {
+				return fmt.Errorf("want.Body=%s got.Body=%s", wantBody, gotBytes)
+			}
+		}
+	}
+
+	return nil
+}
+
+func TestUnmarshalSuccessfulResponse(t *testing.T) {
+	var expiration time.Time
+	expiration.UnmarshalText([]byte("2015-04-07T04:40:23.044979686Z"))
+
+	tests := []struct {
+		hdr     string
+		body    string
+		wantRes *Response
+		wantErr bool
+	}{
+		// Neither PrevNode or Node
+		{
+			hdr:     "1",
+			body:    `{"action":"delete"}`,
+			wantRes: &Response{Action: "delete", Index: 1},
+			wantErr: false,
+		},
+
+		// PrevNode
+		{
+			hdr:  "15",
+			body: `{"action":"delete", "prevNode": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`,
+			wantRes: &Response{
+				Action: "delete",
+				Index:  15,
+				Node:   nil,
+				PrevNode: &Node{
+					Key:           "/foo",
+					Value:         "bar",
+					ModifiedIndex: 12,
+					CreatedIndex:  10,
+				},
+			},
+			wantErr: false,
+		},
+
+		// Node
+		{
+			hdr:  "15",
+			body: `{"action":"get", "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10, "ttl": 10, "expiration": "2015-04-07T04:40:23.044979686Z"}}`,
+			wantRes: &Response{
+				Action: "get",
+				Index:  15,
+				Node: &Node{
+					Key:           "/foo",
+					Value:         "bar",
+					ModifiedIndex: 12,
+					CreatedIndex:  10,
+					TTL:           10,
+					Expiration:    &expiration,
+				},
+				PrevNode: nil,
+			},
+			wantErr: false,
+		},
+
+		// Node Dir
+		{
+			hdr:  "15",
+			body: `{"action":"get", "node": {"key": "/foo", "dir": true, "modifiedIndex": 12, "createdIndex": 10}}`,
+			wantRes: &Response{
+				Action: "get",
+				Index:  15,
+				Node: &Node{
+					Key:           "/foo",
+					Dir:           true,
+					ModifiedIndex: 12,
+					CreatedIndex:  10,
+				},
+				PrevNode: nil,
+			},
+			wantErr: false,
+		},
+
+		// PrevNode and Node
+		{
+			hdr:  "15",
+			body: `{"action":"update", "prevNode": {"key": "/foo", "value": "baz", "modifiedIndex": 10, "createdIndex": 10}, "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`,
+			wantRes: &Response{
+				Action: "update",
+				Index:  15,
+				PrevNode: &Node{
+					Key:           "/foo",
+					Value:         "baz",
+					ModifiedIndex: 10,
+					CreatedIndex:  10,
+				},
+				Node: &Node{
+					Key:           "/foo",
+					Value:         "bar",
+					ModifiedIndex: 12,
+					CreatedIndex:  10,
+				},
+			},
+			wantErr: false,
+		},
+
+		// Garbage in body
+		{
+			hdr:     "",
+			body:    `garbage`,
+			wantRes: nil,
+			wantErr: true,
+		},
+
+		// non-integer index
+		{
+			hdr:     "poo",
+			body:    `{}`,
+			wantRes: nil,
+			wantErr: true,
+		},
+	}
+
+	for i, tt := range tests {
+		h := make(http.Header)
+		h.Add("X-Etcd-Index", tt.hdr)
+		res, err := unmarshalSuccessfulKeysResponse(h, []byte(tt.body))
+		if tt.wantErr != (err != nil) {
+			t.Errorf("#%d: wantErr=%t, err=%v", i, tt.wantErr, err)
+		}
+
+		if (res == nil) != (tt.wantRes == nil) {
+			t.Errorf("#%d: received res=%#v, but expected res=%#v", i, res, tt.wantRes)
+			continue
+		} else if tt.wantRes == nil {
+			// expected and successfully got nil response
+			continue
+		}
+
+		if res.Action != tt.wantRes.Action {
+			t.Errorf("#%d: Action=%s, expected %s", i, res.Action, tt.wantRes.Action)
+		}
+		if res.Index != tt.wantRes.Index {
+			t.Errorf("#%d: Index=%d, expected %d", i, res.Index, tt.wantRes.Index)
+		}
+		if !reflect.DeepEqual(res.Node, tt.wantRes.Node) {
+			t.Errorf("#%d: Node=%v, expected %v", i, res.Node, tt.wantRes.Node)
+		}
+	}
+}
+
+func TestUnmarshalFailedKeysResponse(t *testing.T) {
+	body := []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`)
+
+	wantErr := Error{
+		Code:    100,
+		Message: "Key not found",
+		Cause:   "/foo",
+		Index:   uint64(18),
+	}
+
+	gotErr := unmarshalFailedKeysResponse(body)
+	if !reflect.DeepEqual(wantErr, gotErr) {
+		t.Errorf("unexpected error: want=%#v got=%#v", wantErr, gotErr)
+	}
+}
+
+func TestUnmarshalFailedKeysResponseBadJSON(t *testing.T) {
+	err := unmarshalFailedKeysResponse([]byte(`{"er`))
+	if err == nil {
+		t.Errorf("got nil error")
+	} else if _, ok := err.(Error); ok {
+		t.Errorf("error is of incorrect type *Error: %#v", err)
+	}
+}
+
+func TestHTTPWatcherNextWaitAction(t *testing.T) {
+	initAction := waitAction{
+		Prefix:    "/pants",
+		Key:       "/foo/bar",
+		Recursive: true,
+		WaitIndex: 19,
+	}
+
+	client := &actionAssertingHTTPClient{
+		t:   t,
+		act: &initAction,
+		resp: http.Response{
+			StatusCode: http.StatusOK,
+			Header:     http.Header{"X-Etcd-Index": []string{"42"}},
+		},
+		body: []byte(`{"action":"update","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`),
+	}
+
+	wantResponse := &Response{
+		Action:   "update",
+		Node:     &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(21)},
+		PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)},
+		Index:    uint64(42),
+	}
+
+	wantNextWait := waitAction{
+		Prefix:    "/pants",
+		Key:       "/foo/bar",
+		Recursive: true,
+		WaitIndex: 22,
+	}
+
+	watcher := &httpWatcher{
+		client:   client,
+		nextWait: initAction,
+	}
+
+	resp, err := watcher.Next(context.Background())
+	if err != nil {
+		t.Errorf("non-nil error: %#v", err)
+	}
+
+	if !reflect.DeepEqual(wantResponse, resp) {
+		t.Errorf("received incorrect Response: want=%#v got=%#v", wantResponse, resp)
+	}
+
+	if !reflect.DeepEqual(wantNextWait, watcher.nextWait) {
+		t.Errorf("nextWait incorrect: want=%#v got=%#v", wantNextWait, watcher.nextWait)
+	}
+}
+
+func TestHTTPWatcherNextFail(t *testing.T) {
+	tests := []httpClient{
+		// generic HTTP client failure
+		&staticHTTPClient{
+			err: errors.New("fail!"),
+		},
+
+		// unusable status code
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusTeapot,
+			},
+		},
+
+		// etcd Error response
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusNotFound,
+			},
+			body: []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`),
+		},
+	}
+
+	for i, tt := range tests {
+		act := waitAction{
+			Prefix:    "/pants",
+			Key:       "/foo/bar",
+			Recursive: true,
+			WaitIndex: 19,
+		}
+
+		watcher := &httpWatcher{
+			client:   tt,
+			nextWait: act,
+		}
+
+		resp, err := watcher.Next(context.Background())
+		if err == nil {
+			t.Errorf("#%d: expected non-nil error", i)
+		}
+		if resp != nil {
+			t.Errorf("#%d: expected nil Response, got %#v", i, resp)
+		}
+		if !reflect.DeepEqual(act, watcher.nextWait) {
+			t.Errorf("#%d: nextWait changed: want=%#v got=%#v", i, act, watcher.nextWait)
+		}
+	}
+}
+
+func TestHTTPKeysAPIWatcherAction(t *testing.T) {
+	tests := []struct {
+		key  string
+		opts *WatcherOptions
+		want waitAction
+	}{
+		{
+			key:  "/foo",
+			opts: nil,
+			want: waitAction{
+				Key:       "/foo",
+				Recursive: false,
+				WaitIndex: 0,
+			},
+		},
+
+		{
+			key: "/foo",
+			opts: &WatcherOptions{
+				Recursive:  false,
+				AfterIndex: 0,
+			},
+			want: waitAction{
+				Key:       "/foo",
+				Recursive: false,
+				WaitIndex: 0,
+			},
+		},
+
+		{
+			key: "/foo",
+			opts: &WatcherOptions{
+				Recursive:  true,
+				AfterIndex: 0,
+			},
+			want: waitAction{
+				Key:       "/foo",
+				Recursive: true,
+				WaitIndex: 0,
+			},
+		},
+
+		{
+			key: "/foo",
+			opts: &WatcherOptions{
+				Recursive:  false,
+				AfterIndex: 19,
+			},
+			want: waitAction{
+				Key:       "/foo",
+				Recursive: false,
+				WaitIndex: 20,
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		kAPI := &httpKeysAPI{
+			client: &staticHTTPClient{err: errors.New("fail!")},
+		}
+
+		want := &httpWatcher{
+			client:   &staticHTTPClient{err: errors.New("fail!")},
+			nextWait: tt.want,
+		}
+
+		got := kAPI.Watcher(tt.key, tt.opts)
+		if !reflect.DeepEqual(want, got) {
+			t.Errorf("#%d: incorrect watcher: want=%#v got=%#v", i, want, got)
+		}
+	}
+}
+
+func TestHTTPKeysAPISetAction(t *testing.T) {
+	tests := []struct {
+		key        string
+		value      string
+		opts       *SetOptions
+		wantAction httpAction
+	}{
+		// nil SetOptions
+		{
+			key:   "/foo",
+			value: "bar",
+			opts:  nil,
+			wantAction: &setAction{
+				Key:       "/foo",
+				Value:     "bar",
+				PrevValue: "",
+				PrevIndex: 0,
+				PrevExist: PrevIgnore,
+				TTL:       0,
+			},
+		},
+		// empty SetOptions
+		{
+			key:   "/foo",
+			value: "bar",
+			opts:  &SetOptions{},
+			wantAction: &setAction{
+				Key:       "/foo",
+				Value:     "bar",
+				PrevValue: "",
+				PrevIndex: 0,
+				PrevExist: PrevIgnore,
+				TTL:       0,
+			},
+		},
+		// populated SetOptions
+		{
+			key:   "/foo",
+			value: "bar",
+			opts: &SetOptions{
+				PrevValue: "baz",
+				PrevIndex: 13,
+				PrevExist: PrevExist,
+				TTL:       time.Minute,
+				Dir:       true,
+			},
+			wantAction: &setAction{
+				Key:       "/foo",
+				Value:     "bar",
+				PrevValue: "baz",
+				PrevIndex: 13,
+				PrevExist: PrevExist,
+				TTL:       time.Minute,
+				Dir:       true,
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction}
+		kAPI := httpKeysAPI{client: client}
+		kAPI.Set(context.Background(), tt.key, tt.value, tt.opts)
+	}
+}
+
+func TestHTTPKeysAPISetError(t *testing.T) {
+	tests := []httpClient{
+		// generic HTTP client failure
+		&staticHTTPClient{
+			err: errors.New("fail!"),
+		},
+
+		// unusable status code
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusTeapot,
+			},
+		},
+
+		// etcd Error response
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusInternalServerError,
+			},
+			body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`),
+		},
+	}
+
+	for i, tt := range tests {
+		kAPI := httpKeysAPI{client: tt}
+		resp, err := kAPI.Set(context.Background(), "/foo", "bar", nil)
+		if err == nil {
+			t.Errorf("#%d: received nil error", i)
+		}
+		if resp != nil {
+			t.Errorf("#%d: received non-nil Response: %#v", i, resp)
+		}
+	}
+}
+
+func TestHTTPKeysAPISetResponse(t *testing.T) {
+	client := &staticHTTPClient{
+		resp: http.Response{
+			StatusCode: http.StatusOK,
+			Header:     http.Header{"X-Etcd-Index": []string{"21"}},
+		},
+		body: []byte(`{"action":"set","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":21},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`),
+	}
+
+	wantResponse := &Response{
+		Action:   "set",
+		Node:     &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(21), ModifiedIndex: uint64(21)},
+		PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)},
+		Index:    uint64(21),
+	}
+
+	kAPI := &httpKeysAPI{client: client, prefix: "/pants"}
+	resp, err := kAPI.Set(context.Background(), "/foo/bar/baz", "snarf", nil)
+	if err != nil {
+		t.Errorf("non-nil error: %#v", err)
+	}
+	if !reflect.DeepEqual(wantResponse, resp) {
+		t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp)
+	}
+}
+
+func TestHTTPKeysAPIGetAction(t *testing.T) {
+	tests := []struct {
+		key        string
+		opts       *GetOptions
+		wantAction httpAction
+	}{
+		// nil GetOptions
+		{
+			key:  "/foo",
+			opts: nil,
+			wantAction: &getAction{
+				Key:       "/foo",
+				Sorted:    false,
+				Recursive: false,
+			},
+		},
+		// empty GetOptions
+		{
+			key:  "/foo",
+			opts: &GetOptions{},
+			wantAction: &getAction{
+				Key:       "/foo",
+				Sorted:    false,
+				Recursive: false,
+			},
+		},
+		// populated GetOptions
+		{
+			key: "/foo",
+			opts: &GetOptions{
+				Sort:      true,
+				Recursive: true,
+				Quorum:    true,
+			},
+			wantAction: &getAction{
+				Key:       "/foo",
+				Sorted:    true,
+				Recursive: true,
+				Quorum:    true,
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction}
+		kAPI := httpKeysAPI{client: client}
+		kAPI.Get(context.Background(), tt.key, tt.opts)
+	}
+}
+
+func TestHTTPKeysAPIGetError(t *testing.T) {
+	tests := []httpClient{
+		// generic HTTP client failure
+		&staticHTTPClient{
+			err: errors.New("fail!"),
+		},
+
+		// unusable status code
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusTeapot,
+			},
+		},
+
+		// etcd Error response
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusInternalServerError,
+			},
+			body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`),
+		},
+	}
+
+	for i, tt := range tests {
+		kAPI := httpKeysAPI{client: tt}
+		resp, err := kAPI.Get(context.Background(), "/foo", nil)
+		if err == nil {
+			t.Errorf("#%d: received nil error", i)
+		}
+		if resp != nil {
+			t.Errorf("#%d: received non-nil Response: %#v", i, resp)
+		}
+	}
+}
+
+func TestHTTPKeysAPIGetResponse(t *testing.T) {
+	client := &staticHTTPClient{
+		resp: http.Response{
+			StatusCode: http.StatusOK,
+			Header:     http.Header{"X-Etcd-Index": []string{"42"}},
+		},
+		body: []byte(`{"action":"get","node":{"key":"/pants/foo/bar","modifiedIndex":25,"createdIndex":19,"nodes":[{"key":"/pants/foo/bar/baz","value":"snarf","createdIndex":21,"modifiedIndex":25}]}}`),
+	}
+
+	wantResponse := &Response{
+		Action: "get",
+		Node: &Node{
+			Key: "/pants/foo/bar",
+			Nodes: []*Node{
+				{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: 21, ModifiedIndex: 25},
+			},
+			CreatedIndex:  uint64(19),
+			ModifiedIndex: uint64(25),
+		},
+		Index: uint64(42),
+	}
+
+	kAPI := &httpKeysAPI{client: client, prefix: "/pants"}
+	resp, err := kAPI.Get(context.Background(), "/foo/bar", &GetOptions{Recursive: true})
+	if err != nil {
+		t.Errorf("non-nil error: %#v", err)
+	}
+	if !reflect.DeepEqual(wantResponse, resp) {
+		t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp)
+	}
+}
+
+func TestHTTPKeysAPIDeleteAction(t *testing.T) {
+	tests := []struct {
+		key        string
+		value      string
+		opts       *DeleteOptions
+		wantAction httpAction
+	}{
+		// nil DeleteOptions
+		{
+			key:  "/foo",
+			opts: nil,
+			wantAction: &deleteAction{
+				Key:       "/foo",
+				PrevValue: "",
+				PrevIndex: 0,
+				Recursive: false,
+			},
+		},
+		// empty DeleteOptions
+		{
+			key:  "/foo",
+			opts: &DeleteOptions{},
+			wantAction: &deleteAction{
+				Key:       "/foo",
+				PrevValue: "",
+				PrevIndex: 0,
+				Recursive: false,
+			},
+		},
+		// populated DeleteOptions
+		{
+			key: "/foo",
+			opts: &DeleteOptions{
+				PrevValue: "baz",
+				PrevIndex: 13,
+				Recursive: true,
+			},
+			wantAction: &deleteAction{
+				Key:       "/foo",
+				PrevValue: "baz",
+				PrevIndex: 13,
+				Recursive: true,
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction}
+		kAPI := httpKeysAPI{client: client}
+		kAPI.Delete(context.Background(), tt.key, tt.opts)
+	}
+}
+
+func TestHTTPKeysAPIDeleteError(t *testing.T) {
+	tests := []httpClient{
+		// generic HTTP client failure
+		&staticHTTPClient{
+			err: errors.New("fail!"),
+		},
+
+		// unusable status code
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusTeapot,
+			},
+		},
+
+		// etcd Error response
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusInternalServerError,
+			},
+			body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`),
+		},
+	}
+
+	for i, tt := range tests {
+		kAPI := httpKeysAPI{client: tt}
+		resp, err := kAPI.Delete(context.Background(), "/foo", nil)
+		if err == nil {
+			t.Errorf("#%d: received nil error", i)
+		}
+		if resp != nil {
+			t.Errorf("#%d: received non-nil Response: %#v", i, resp)
+		}
+	}
+}
+
+func TestHTTPKeysAPIDeleteResponse(t *testing.T) {
+	client := &staticHTTPClient{
+		resp: http.Response{
+			StatusCode: http.StatusOK,
+			Header:     http.Header{"X-Etcd-Index": []string{"22"}},
+		},
+		body: []byte(`{"action":"delete","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":22,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`),
+	}
+
+	wantResponse := &Response{
+		Action:   "delete",
+		Node:     &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(22)},
+		PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)},
+		Index:    uint64(22),
+	}
+
+	kAPI := &httpKeysAPI{client: client, prefix: "/pants"}
+	resp, err := kAPI.Delete(context.Background(), "/foo/bar/baz", nil)
+	if err != nil {
+		t.Errorf("non-nil error: %#v", err)
+	}
+	if !reflect.DeepEqual(wantResponse, resp) {
+		t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp)
+	}
+}
+
+func TestHTTPKeysAPICreateAction(t *testing.T) {
+	act := &setAction{
+		Key:       "/foo",
+		Value:     "bar",
+		PrevExist: PrevNoExist,
+		PrevIndex: 0,
+		PrevValue: "",
+		TTL:       0,
+	}
+
+	kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}}
+	kAPI.Create(context.Background(), "/foo", "bar")
+}
+
+func TestHTTPKeysAPICreateInOrderAction(t *testing.T) {
+	act := &createInOrderAction{
+		Dir:   "/foo",
+		Value: "bar",
+		TTL:   0,
+	}
+	kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}}
+	kAPI.CreateInOrder(context.Background(), "/foo", "bar", nil)
+}
+
+func TestHTTPKeysAPIUpdateAction(t *testing.T) {
+	act := &setAction{
+		Key:       "/foo",
+		Value:     "bar",
+		PrevExist: PrevExist,
+		PrevIndex: 0,
+		PrevValue: "",
+		TTL:       0,
+	}
+
+	kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}}
+	kAPI.Update(context.Background(), "/foo", "bar")
+}
+
+func TestNodeTTLDuration(t *testing.T) {
+	tests := []struct {
+		node *Node
+		want time.Duration
+	}{
+		{
+			node: &Node{TTL: 0},
+			want: 0,
+		},
+		{
+			node: &Node{TTL: 97},
+			want: 97 * time.Second,
+		},
+	}
+
+	for i, tt := range tests {
+		got := tt.node.TTLDuration()
+		if tt.want != got {
+			t.Errorf("#%d: incorrect duration: want=%v got=%v", i, tt.want, got)
+		}
+	}
+}

+ 272 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go

@@ -0,0 +1,272 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"bytes"
+	"encoding/json"
+	"fmt"
+	"net/http"
+	"net/url"
+	"path"
+
+	"golang.org/x/net/context"
+
+	"github.com/coreos/etcd/pkg/types"
+)
+
+var (
+	defaultV2MembersPrefix = "/v2/members"
+)
+
+type Member struct {
+	// ID is the unique identifier of this Member.
+	ID string `json:"id"`
+
+	// Name is a human-readable, non-unique identifier of this Member.
+	Name string `json:"name"`
+
+	// PeerURLs represents the HTTP(S) endpoints this Member uses to
+	// participate in etcd's consensus protocol.
+	PeerURLs []string `json:"peerURLs"`
+
+	// ClientURLs represents the HTTP(S) endpoints on which this Member
+	// serves it's client-facing APIs.
+	ClientURLs []string `json:"clientURLs"`
+}
+
+type memberCollection []Member
+
+func (c *memberCollection) UnmarshalJSON(data []byte) error {
+	d := struct {
+		Members []Member
+	}{}
+
+	if err := json.Unmarshal(data, &d); err != nil {
+		return err
+	}
+
+	if d.Members == nil {
+		*c = make([]Member, 0)
+		return nil
+	}
+
+	*c = d.Members
+	return nil
+}
+
+type memberCreateOrUpdateRequest struct {
+	PeerURLs types.URLs
+}
+
+func (m *memberCreateOrUpdateRequest) MarshalJSON() ([]byte, error) {
+	s := struct {
+		PeerURLs []string `json:"peerURLs"`
+	}{
+		PeerURLs: make([]string, len(m.PeerURLs)),
+	}
+
+	for i, u := range m.PeerURLs {
+		s.PeerURLs[i] = u.String()
+	}
+
+	return json.Marshal(&s)
+}
+
+// NewMembersAPI constructs a new MembersAPI that uses HTTP to
+// interact with etcd's membership API.
+func NewMembersAPI(c Client) MembersAPI {
+	return &httpMembersAPI{
+		client: c,
+	}
+}
+
+type MembersAPI interface {
+	// List enumerates the current cluster membership.
+	List(ctx context.Context) ([]Member, error)
+
+	// Add instructs etcd to accept a new Member into the cluster.
+	Add(ctx context.Context, peerURL string) (*Member, error)
+
+	// Remove demotes an existing Member out of the cluster.
+	Remove(ctx context.Context, mID string) error
+
+	// Update instructs etcd to update an existing Member in the cluster.
+	Update(ctx context.Context, mID string, peerURLs []string) error
+}
+
+type httpMembersAPI struct {
+	client httpClient
+}
+
+func (m *httpMembersAPI) List(ctx context.Context) ([]Member, error) {
+	req := &membersAPIActionList{}
+	resp, body, err := m.client.Do(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+
+	if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil {
+		return nil, err
+	}
+
+	var mCollection memberCollection
+	if err := json.Unmarshal(body, &mCollection); err != nil {
+		return nil, err
+	}
+
+	return []Member(mCollection), nil
+}
+
+func (m *httpMembersAPI) Add(ctx context.Context, peerURL string) (*Member, error) {
+	urls, err := types.NewURLs([]string{peerURL})
+	if err != nil {
+		return nil, err
+	}
+
+	req := &membersAPIActionAdd{peerURLs: urls}
+	resp, body, err := m.client.Do(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+
+	if err := assertStatusCode(resp.StatusCode, http.StatusCreated, http.StatusConflict); err != nil {
+		return nil, err
+	}
+
+	if resp.StatusCode != http.StatusCreated {
+		var merr membersError
+		if err := json.Unmarshal(body, &merr); err != nil {
+			return nil, err
+		}
+		return nil, merr
+	}
+
+	var memb Member
+	if err := json.Unmarshal(body, &memb); err != nil {
+		return nil, err
+	}
+
+	return &memb, nil
+}
+
+func (m *httpMembersAPI) Update(ctx context.Context, memberID string, peerURLs []string) error {
+	urls, err := types.NewURLs(peerURLs)
+	if err != nil {
+		return err
+	}
+
+	req := &membersAPIActionUpdate{peerURLs: urls, memberID: memberID}
+	resp, body, err := m.client.Do(ctx, req)
+	if err != nil {
+		return err
+	}
+
+	if err := assertStatusCode(resp.StatusCode, http.StatusNoContent, http.StatusNotFound, http.StatusConflict); err != nil {
+		return err
+	}
+
+	if resp.StatusCode != http.StatusNoContent {
+		var merr membersError
+		if err := json.Unmarshal(body, &merr); err != nil {
+			return err
+		}
+		return merr
+	}
+
+	return nil
+}
+
+func (m *httpMembersAPI) Remove(ctx context.Context, memberID string) error {
+	req := &membersAPIActionRemove{memberID: memberID}
+	resp, _, err := m.client.Do(ctx, req)
+	if err != nil {
+		return err
+	}
+
+	return assertStatusCode(resp.StatusCode, http.StatusNoContent, http.StatusGone)
+}
+
+type membersAPIActionList struct{}
+
+func (l *membersAPIActionList) HTTPRequest(ep url.URL) *http.Request {
+	u := v2MembersURL(ep)
+	req, _ := http.NewRequest("GET", u.String(), nil)
+	return req
+}
+
+type membersAPIActionRemove struct {
+	memberID string
+}
+
+func (d *membersAPIActionRemove) HTTPRequest(ep url.URL) *http.Request {
+	u := v2MembersURL(ep)
+	u.Path = path.Join(u.Path, d.memberID)
+	req, _ := http.NewRequest("DELETE", u.String(), nil)
+	return req
+}
+
+type membersAPIActionAdd struct {
+	peerURLs types.URLs
+}
+
+func (a *membersAPIActionAdd) HTTPRequest(ep url.URL) *http.Request {
+	u := v2MembersURL(ep)
+	m := memberCreateOrUpdateRequest{PeerURLs: a.peerURLs}
+	b, _ := json.Marshal(&m)
+	req, _ := http.NewRequest("POST", u.String(), bytes.NewReader(b))
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+type membersAPIActionUpdate struct {
+	memberID string
+	peerURLs types.URLs
+}
+
+func (a *membersAPIActionUpdate) HTTPRequest(ep url.URL) *http.Request {
+	u := v2MembersURL(ep)
+	m := memberCreateOrUpdateRequest{PeerURLs: a.peerURLs}
+	u.Path = path.Join(u.Path, a.memberID)
+	b, _ := json.Marshal(&m)
+	req, _ := http.NewRequest("PUT", u.String(), bytes.NewReader(b))
+	req.Header.Set("Content-Type", "application/json")
+	return req
+}
+
+func assertStatusCode(got int, want ...int) (err error) {
+	for _, w := range want {
+		if w == got {
+			return nil
+		}
+	}
+	return fmt.Errorf("unexpected status code %d", got)
+}
+
+// v2MembersURL add the necessary path to the provided endpoint
+// to route requests to the default v2 members API.
+func v2MembersURL(ep url.URL) *url.URL {
+	ep.Path = path.Join(ep.Path, defaultV2MembersPrefix)
+	return &ep
+}
+
+type membersError struct {
+	Message string `json:"message"`
+	Code    int    `json:"-"`
+}
+
+func (e membersError) Error() string {
+	return e.Message
+}

+ 522 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go

@@ -0,0 +1,522 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"encoding/json"
+	"errors"
+	"net/http"
+	"net/url"
+	"reflect"
+	"testing"
+
+	"golang.org/x/net/context"
+
+	"github.com/coreos/etcd/pkg/types"
+)
+
+func TestMembersAPIActionList(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com"}
+	act := &membersAPIActionList{}
+
+	wantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/members",
+	}
+
+	got := *act.HTTPRequest(ep)
+	err := assertRequest(got, "GET", wantURL, http.Header{}, nil)
+	if err != nil {
+		t.Error(err.Error())
+	}
+}
+
+func TestMembersAPIActionAdd(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com"}
+	act := &membersAPIActionAdd{
+		peerURLs: types.URLs([]url.URL{
+			{Scheme: "https", Host: "127.0.0.1:8081"},
+			{Scheme: "http", Host: "127.0.0.1:8080"},
+		}),
+	}
+
+	wantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/members",
+	}
+	wantHeader := http.Header{
+		"Content-Type": []string{"application/json"},
+	}
+	wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`)
+
+	got := *act.HTTPRequest(ep)
+	err := assertRequest(got, "POST", wantURL, wantHeader, wantBody)
+	if err != nil {
+		t.Error(err.Error())
+	}
+}
+
+func TestMembersAPIActionUpdate(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com"}
+	act := &membersAPIActionUpdate{
+		memberID: "0xabcd",
+		peerURLs: types.URLs([]url.URL{
+			{Scheme: "https", Host: "127.0.0.1:8081"},
+			{Scheme: "http", Host: "127.0.0.1:8080"},
+		}),
+	}
+
+	wantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/members/0xabcd",
+	}
+	wantHeader := http.Header{
+		"Content-Type": []string{"application/json"},
+	}
+	wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`)
+
+	got := *act.HTTPRequest(ep)
+	err := assertRequest(got, "PUT", wantURL, wantHeader, wantBody)
+	if err != nil {
+		t.Error(err.Error())
+	}
+}
+
+func TestMembersAPIActionRemove(t *testing.T) {
+	ep := url.URL{Scheme: "http", Host: "example.com"}
+	act := &membersAPIActionRemove{memberID: "XXX"}
+
+	wantURL := &url.URL{
+		Scheme: "http",
+		Host:   "example.com",
+		Path:   "/v2/members/XXX",
+	}
+
+	got := *act.HTTPRequest(ep)
+	err := assertRequest(got, "DELETE", wantURL, http.Header{}, nil)
+	if err != nil {
+		t.Error(err.Error())
+	}
+}
+
+func TestAssertStatusCode(t *testing.T) {
+	if err := assertStatusCode(404, 400); err == nil {
+		t.Errorf("assertStatusCode failed to detect conflict in 400 vs 404")
+	}
+
+	if err := assertStatusCode(404, 400, 404); err != nil {
+		t.Errorf("assertStatusCode found conflict in (404,400) vs 400: %v", err)
+	}
+}
+
+func TestV2MembersURL(t *testing.T) {
+	got := v2MembersURL(url.URL{
+		Scheme: "http",
+		Host:   "foo.example.com:4002",
+		Path:   "/pants",
+	})
+	want := &url.URL{
+		Scheme: "http",
+		Host:   "foo.example.com:4002",
+		Path:   "/pants/v2/members",
+	}
+
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("v2MembersURL got %#v, want %#v", got, want)
+	}
+}
+
+func TestMemberUnmarshal(t *testing.T) {
+	tests := []struct {
+		body       []byte
+		wantMember Member
+		wantError  bool
+	}{
+		// no URLs, just check ID & Name
+		{
+			body:       []byte(`{"id": "c", "name": "dungarees"}`),
+			wantMember: Member{ID: "c", Name: "dungarees", PeerURLs: nil, ClientURLs: nil},
+		},
+
+		// both client and peer URLs
+		{
+			body: []byte(`{"peerURLs": ["http://127.0.0.1:2379"], "clientURLs": ["http://127.0.0.1:2379"]}`),
+			wantMember: Member{
+				PeerURLs: []string{
+					"http://127.0.0.1:2379",
+				},
+				ClientURLs: []string{
+					"http://127.0.0.1:2379",
+				},
+			},
+		},
+
+		// multiple peer URLs
+		{
+			body: []byte(`{"peerURLs": ["http://127.0.0.1:2379", "https://example.com"]}`),
+			wantMember: Member{
+				PeerURLs: []string{
+					"http://127.0.0.1:2379",
+					"https://example.com",
+				},
+				ClientURLs: nil,
+			},
+		},
+
+		// multiple client URLs
+		{
+			body: []byte(`{"clientURLs": ["http://127.0.0.1:2379", "https://example.com"]}`),
+			wantMember: Member{
+				PeerURLs: nil,
+				ClientURLs: []string{
+					"http://127.0.0.1:2379",
+					"https://example.com",
+				},
+			},
+		},
+
+		// invalid JSON
+		{
+			body:      []byte(`{"peerU`),
+			wantError: true,
+		},
+	}
+
+	for i, tt := range tests {
+		got := Member{}
+		err := json.Unmarshal(tt.body, &got)
+		if tt.wantError != (err != nil) {
+			t.Errorf("#%d: want error %t, got %v", i, tt.wantError, err)
+			continue
+		}
+
+		if !reflect.DeepEqual(tt.wantMember, got) {
+			t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.wantMember, got)
+		}
+	}
+}
+
+func TestMemberCollectionUnmarshalFail(t *testing.T) {
+	mc := &memberCollection{}
+	if err := mc.UnmarshalJSON([]byte(`{`)); err == nil {
+		t.Errorf("got nil error")
+	}
+}
+
+func TestMemberCollectionUnmarshal(t *testing.T) {
+	tests := []struct {
+		body []byte
+		want memberCollection
+	}{
+		{
+			body: []byte(`{}`),
+			want: memberCollection([]Member{}),
+		},
+		{
+			body: []byte(`{"members":[]}`),
+			want: memberCollection([]Member{}),
+		},
+		{
+			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+			want: memberCollection(
+				[]Member{
+					{
+						ID:   "2745e2525fce8fe",
+						Name: "node3",
+						PeerURLs: []string{
+							"http://127.0.0.1:7003",
+						},
+						ClientURLs: []string{
+							"http://127.0.0.1:4003",
+						},
+					},
+					{
+						ID:   "42134f434382925",
+						Name: "node1",
+						PeerURLs: []string{
+							"http://127.0.0.1:2380",
+							"http://127.0.0.1:7001",
+						},
+						ClientURLs: []string{
+							"http://127.0.0.1:2379",
+							"http://127.0.0.1:4001",
+						},
+					},
+					{
+						ID:   "94088180e21eb87b",
+						Name: "node2",
+						PeerURLs: []string{
+							"http://127.0.0.1:7002",
+						},
+						ClientURLs: []string{
+							"http://127.0.0.1:4002",
+						},
+					},
+				},
+			),
+		},
+	}
+
+	for i, tt := range tests {
+		var got memberCollection
+		err := json.Unmarshal(tt.body, &got)
+		if err != nil {
+			t.Errorf("#%d: unexpected error: %v", i, err)
+			continue
+		}
+
+		if !reflect.DeepEqual(tt.want, got) {
+			t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.want, got)
+		}
+	}
+}
+
+func TestMemberCreateRequestMarshal(t *testing.T) {
+	req := memberCreateOrUpdateRequest{
+		PeerURLs: types.URLs([]url.URL{
+			{Scheme: "http", Host: "127.0.0.1:8081"},
+			{Scheme: "https", Host: "127.0.0.1:8080"},
+		}),
+	}
+	want := []byte(`{"peerURLs":["http://127.0.0.1:8081","https://127.0.0.1:8080"]}`)
+
+	got, err := json.Marshal(&req)
+	if err != nil {
+		t.Fatalf("Marshal returned unexpected err=%v", err)
+	}
+
+	if !reflect.DeepEqual(want, got) {
+		t.Fatalf("Failed to marshal memberCreateRequest: want=%s, got=%s", want, got)
+	}
+}
+
+func TestHTTPMembersAPIAddSuccess(t *testing.T) {
+	wantAction := &membersAPIActionAdd{
+		peerURLs: types.URLs([]url.URL{
+			{Scheme: "http", Host: "127.0.0.1:7002"},
+		}),
+	}
+
+	mAPI := &httpMembersAPI{
+		client: &actionAssertingHTTPClient{
+			t:   t,
+			act: wantAction,
+			resp: http.Response{
+				StatusCode: http.StatusCreated,
+			},
+			body: []byte(`{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"]}`),
+		},
+	}
+
+	wantResponseMember := &Member{
+		ID:       "94088180e21eb87b",
+		PeerURLs: []string{"http://127.0.0.1:7002"},
+	}
+
+	m, err := mAPI.Add(context.Background(), "http://127.0.0.1:7002")
+	if err != nil {
+		t.Errorf("got non-nil err: %#v", err)
+	}
+	if !reflect.DeepEqual(wantResponseMember, m) {
+		t.Errorf("incorrect Member: want=%#v got=%#v", wantResponseMember, m)
+	}
+}
+
+func TestHTTPMembersAPIAddError(t *testing.T) {
+	okPeer := "http://example.com:2379"
+	tests := []struct {
+		peerURL string
+		client  httpClient
+
+		// if wantErr == nil, assert that the returned error is non-nil
+		// if wantErr != nil, assert that the returned error matches
+		wantErr error
+	}{
+		// malformed peer URL
+		{
+			peerURL: ":",
+		},
+
+		// generic httpClient failure
+		{
+			peerURL: okPeer,
+			client:  &staticHTTPClient{err: errors.New("fail!")},
+		},
+
+		// unrecognized HTTP status code
+		{
+			peerURL: okPeer,
+			client: &staticHTTPClient{
+				resp: http.Response{StatusCode: http.StatusTeapot},
+			},
+		},
+
+		// unmarshal body into membersError on StatusConflict
+		{
+			peerURL: okPeer,
+			client: &staticHTTPClient{
+				resp: http.Response{
+					StatusCode: http.StatusConflict,
+				},
+				body: []byte(`{"message":"fail!"}`),
+			},
+			wantErr: membersError{Message: "fail!"},
+		},
+
+		// fail to unmarshal body on StatusConflict
+		{
+			peerURL: okPeer,
+			client: &staticHTTPClient{
+				resp: http.Response{
+					StatusCode: http.StatusConflict,
+				},
+				body: []byte(`{"`),
+			},
+		},
+
+		// fail to unmarshal body on StatusCreated
+		{
+			peerURL: okPeer,
+			client: &staticHTTPClient{
+				resp: http.Response{
+					StatusCode: http.StatusCreated,
+				},
+				body: []byte(`{"id":"XX`),
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		mAPI := &httpMembersAPI{client: tt.client}
+		m, err := mAPI.Add(context.Background(), tt.peerURL)
+		if err == nil {
+			t.Errorf("#%d: got nil err", i)
+		}
+		if tt.wantErr != nil && !reflect.DeepEqual(tt.wantErr, err) {
+			t.Errorf("#%d: incorrect error: want=%#v got=%#v", i, tt.wantErr, err)
+		}
+		if m != nil {
+			t.Errorf("#%d: got non-nil Member", i)
+		}
+	}
+}
+
+func TestHTTPMembersAPIRemoveSuccess(t *testing.T) {
+	wantAction := &membersAPIActionRemove{
+		memberID: "94088180e21eb87b",
+	}
+
+	mAPI := &httpMembersAPI{
+		client: &actionAssertingHTTPClient{
+			t:   t,
+			act: wantAction,
+			resp: http.Response{
+				StatusCode: http.StatusNoContent,
+			},
+		},
+	}
+
+	if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err != nil {
+		t.Errorf("got non-nil err: %#v", err)
+	}
+}
+
+func TestHTTPMembersAPIRemoveFail(t *testing.T) {
+	tests := []httpClient{
+		// generic error
+		&staticHTTPClient{
+			err: errors.New("fail!"),
+		},
+
+		// unexpected HTTP status code
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusInternalServerError,
+			},
+		},
+	}
+
+	for i, tt := range tests {
+		mAPI := &httpMembersAPI{client: tt}
+		if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err == nil {
+			t.Errorf("#%d: got nil err", i)
+		}
+	}
+}
+
+func TestHTTPMembersAPIListSuccess(t *testing.T) {
+	wantAction := &membersAPIActionList{}
+	mAPI := &httpMembersAPI{
+		client: &actionAssertingHTTPClient{
+			t:   t,
+			act: wantAction,
+			resp: http.Response{
+				StatusCode: http.StatusOK,
+			},
+			body: []byte(`{"members":[{"id":"94088180e21eb87b","name":"node2","peerURLs":["http://127.0.0.1:7002"],"clientURLs":["http://127.0.0.1:4002"]}]}`),
+		},
+	}
+
+	wantResponseMembers := []Member{
+		{
+			ID:         "94088180e21eb87b",
+			Name:       "node2",
+			PeerURLs:   []string{"http://127.0.0.1:7002"},
+			ClientURLs: []string{"http://127.0.0.1:4002"},
+		},
+	}
+
+	m, err := mAPI.List(context.Background())
+	if err != nil {
+		t.Errorf("got non-nil err: %#v", err)
+	}
+	if !reflect.DeepEqual(wantResponseMembers, m) {
+		t.Errorf("incorrect Members: want=%#v got=%#v", wantResponseMembers, m)
+	}
+}
+
+func TestHTTPMembersAPIListError(t *testing.T) {
+	tests := []httpClient{
+		// generic httpClient failure
+		&staticHTTPClient{err: errors.New("fail!")},
+
+		// unrecognized HTTP status code
+		&staticHTTPClient{
+			resp: http.Response{StatusCode: http.StatusTeapot},
+		},
+
+		// fail to unmarshal body on StatusOK
+		&staticHTTPClient{
+			resp: http.Response{
+				StatusCode: http.StatusOK,
+			},
+			body: []byte(`[{"id":"XX`),
+		},
+	}
+
+	for i, tt := range tests {
+		mAPI := &httpMembersAPI{client: tt}
+		ms, err := mAPI.List(context.Background())
+		if err == nil {
+			t.Errorf("#%d: got nil err", i)
+		}
+		if ms != nil {
+			t.Errorf("#%d: got non-nil Member slice", i)
+		}
+	}
+}

+ 65 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go

@@ -0,0 +1,65 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"fmt"
+	"net"
+	"net/url"
+)
+
+var (
+	// indirection for testing
+	lookupSRV = net.LookupSRV
+)
+
+type srvDiscover struct{}
+
+// NewSRVDiscover constructs a new Dicoverer that uses the stdlib to lookup SRV records.
+func NewSRVDiscover() Discoverer {
+	return &srvDiscover{}
+}
+
+// Discover looks up the etcd servers for the domain.
+func (d *srvDiscover) Discover(domain string) ([]string, error) {
+	var urls []*url.URL
+
+	updateURLs := func(service, scheme string) error {
+		_, addrs, err := lookupSRV(service, "tcp", domain)
+		if err != nil {
+			return err
+		}
+		for _, srv := range addrs {
+			urls = append(urls, &url.URL{
+				Scheme: scheme,
+				Host:   net.JoinHostPort(srv.Target, fmt.Sprintf("%d", srv.Port)),
+			})
+		}
+		return nil
+	}
+
+	errHTTPS := updateURLs("etcd-server-ssl", "https")
+	errHTTP := updateURLs("etcd-server", "http")
+
+	if errHTTPS != nil && errHTTP != nil {
+		return nil, fmt.Errorf("dns lookup errors: %s and %s", errHTTPS, errHTTP)
+	}
+
+	endpoints := make([]string, len(urls))
+	for i := range urls {
+		endpoints[i] = urls[i].String()
+	}
+	return endpoints, nil
+}

+ 102 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go

@@ -0,0 +1,102 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+import (
+	"errors"
+	"net"
+	"reflect"
+	"testing"
+)
+
+func TestSRVDiscover(t *testing.T) {
+	defer func() { lookupSRV = net.LookupSRV }()
+
+	tests := []struct {
+		withSSL    []*net.SRV
+		withoutSSL []*net.SRV
+		expected   []string
+	}{
+		{
+			[]*net.SRV{},
+			[]*net.SRV{},
+			[]string{},
+		},
+		{
+			[]*net.SRV{
+				{Target: "10.0.0.1", Port: 2480},
+				{Target: "10.0.0.2", Port: 2480},
+				{Target: "10.0.0.3", Port: 2480},
+			},
+			[]*net.SRV{},
+			[]string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480"},
+		},
+		{
+			[]*net.SRV{
+				{Target: "10.0.0.1", Port: 2480},
+				{Target: "10.0.0.2", Port: 2480},
+				{Target: "10.0.0.3", Port: 2480},
+			},
+			[]*net.SRV{
+				{Target: "10.0.0.1", Port: 7001},
+			},
+			[]string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"},
+		},
+		{
+			[]*net.SRV{
+				{Target: "10.0.0.1", Port: 2480},
+				{Target: "10.0.0.2", Port: 2480},
+				{Target: "10.0.0.3", Port: 2480},
+			},
+			[]*net.SRV{
+				{Target: "10.0.0.1", Port: 7001},
+			},
+			[]string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"},
+		},
+		{
+			[]*net.SRV{
+				{Target: "a.example.com", Port: 2480},
+				{Target: "b.example.com", Port: 2480},
+				{Target: "c.example.com", Port: 2480},
+			},
+			[]*net.SRV{},
+			[]string{"https://a.example.com:2480", "https://b.example.com:2480", "https://c.example.com:2480"},
+		},
+	}
+
+	for i, tt := range tests {
+		lookupSRV = func(service string, proto string, domain string) (string, []*net.SRV, error) {
+			if service == "etcd-server-ssl" {
+				return "", tt.withSSL, nil
+			}
+			if service == "etcd-server" {
+				return "", tt.withoutSSL, nil
+			}
+			return "", nil, errors.New("Unkown service in mock")
+		}
+
+		d := NewSRVDiscover()
+
+		endpoints, err := d.Discover("example.com")
+		if err != nil {
+			t.Fatalf("%d: err: %#v", i, err)
+		}
+
+		if !reflect.DeepEqual(endpoints, tt.expected) {
+			t.Errorf("#%d: endpoints = %v, want %v", i, endpoints, tt.expected)
+		}
+
+	}
+}

+ 29 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go

@@ -0,0 +1,29 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package pathutil
+
+import "path"
+
+// CanonicalURLPath returns the canonical url path for p, which follows the rules:
+// 1. the path always starts with "/"
+// 2. replace multiple slashes with a single slash
+// 3. replace each '.' '..' path name element with equivalent one
+// 4. keep the trailing slash
+// The function is borrowed from stdlib http.cleanPath in server.go.
+func CanonicalURLPath(p string) string {
+	if p == "" {
+		return "/"
+	}
+	if p[0] != '/' {
+		p = "/" + p
+	}
+	np := path.Clean(p)
+	// path.Clean removes trailing slash except for root,
+	// put the trailing slash back if necessary.
+	if p[len(p)-1] == '/' && np != "/" {
+		np += "/"
+	}
+	return np
+}

+ 38 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go

@@ -0,0 +1,38 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package pathutil
+
+import "testing"
+
+func TestCanonicalURLPath(t *testing.T) {
+	tests := []struct {
+		p  string
+		wp string
+	}{
+		{"/a", "/a"},
+		{"", "/"},
+		{"a", "/a"},
+		{"//a", "/a"},
+		{"/a/.", "/a"},
+		{"/a/..", "/"},
+		{"/a/", "/a/"},
+		{"/a//", "/a/"},
+	}
+	for i, tt := range tests {
+		if g := CanonicalURLPath(tt.p); g != tt.wp {
+			t.Errorf("#%d: canonical path = %s, want %s", i, g, tt.wp)
+		}
+	}
+}

+ 41 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go

@@ -0,0 +1,41 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"strconv"
+)
+
+// ID represents a generic identifier which is canonically
+// stored as a uint64 but is typically represented as a
+// base-16 string for input/output
+type ID uint64
+
+func (i ID) String() string {
+	return strconv.FormatUint(uint64(i), 16)
+}
+
+// IDFromString attempts to create an ID from a base-16 string.
+func IDFromString(s string) (ID, error) {
+	i, err := strconv.ParseUint(s, 16, 64)
+	return ID(i), err
+}
+
+// IDSlice implements the sort interface
+type IDSlice []ID
+
+func (p IDSlice) Len() int           { return len(p) }
+func (p IDSlice) Less(i, j int) bool { return uint64(p[i]) < uint64(p[j]) }
+func (p IDSlice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }

+ 95 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go

@@ -0,0 +1,95 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"sort"
+	"testing"
+)
+
+func TestIDString(t *testing.T) {
+	tests := []struct {
+		input ID
+		want  string
+	}{
+		{
+			input: 12,
+			want:  "c",
+		},
+		{
+			input: 4918257920282737594,
+			want:  "444129853c343bba",
+		},
+	}
+
+	for i, tt := range tests {
+		got := tt.input.String()
+		if tt.want != got {
+			t.Errorf("#%d: ID.String failure: want=%v, got=%v", i, tt.want, got)
+		}
+	}
+}
+
+func TestIDFromString(t *testing.T) {
+	tests := []struct {
+		input string
+		want  ID
+	}{
+		{
+			input: "17",
+			want:  23,
+		},
+		{
+			input: "612840dae127353",
+			want:  437557308098245459,
+		},
+	}
+
+	for i, tt := range tests {
+		got, err := IDFromString(tt.input)
+		if err != nil {
+			t.Errorf("#%d: IDFromString failure: err=%v", i, err)
+			continue
+		}
+		if tt.want != got {
+			t.Errorf("#%d: IDFromString failure: want=%v, got=%v", i, tt.want, got)
+		}
+	}
+}
+
+func TestIDFromStringFail(t *testing.T) {
+	tests := []string{
+		"",
+		"XXX",
+		"612840dae127353612840dae127353",
+	}
+
+	for i, tt := range tests {
+		_, err := IDFromString(tt)
+		if err == nil {
+			t.Fatalf("#%d: IDFromString expected error, but err=nil", i)
+		}
+	}
+}
+
+func TestIDSlice(t *testing.T) {
+	g := []ID{10, 500, 5, 1, 100, 25}
+	w := []ID{1, 5, 10, 25, 100, 500}
+	sort.Sort(IDSlice(g))
+	if !reflect.DeepEqual(g, w) {
+		t.Errorf("slice after sort = %#v, want %#v", g, w)
+	}
+}

+ 178 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go

@@ -0,0 +1,178 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"sort"
+	"sync"
+)
+
+type Set interface {
+	Add(string)
+	Remove(string)
+	Contains(string) bool
+	Equals(Set) bool
+	Length() int
+	Values() []string
+	Copy() Set
+	Sub(Set) Set
+}
+
+func NewUnsafeSet(values ...string) *unsafeSet {
+	set := &unsafeSet{make(map[string]struct{})}
+	for _, v := range values {
+		set.Add(v)
+	}
+	return set
+}
+
+func NewThreadsafeSet(values ...string) *tsafeSet {
+	us := NewUnsafeSet(values...)
+	return &tsafeSet{us, sync.RWMutex{}}
+}
+
+type unsafeSet struct {
+	d map[string]struct{}
+}
+
+// Add adds a new value to the set (no-op if the value is already present)
+func (us *unsafeSet) Add(value string) {
+	us.d[value] = struct{}{}
+}
+
+// Remove removes the given value from the set
+func (us *unsafeSet) Remove(value string) {
+	delete(us.d, value)
+}
+
+// Contains returns whether the set contains the given value
+func (us *unsafeSet) Contains(value string) (exists bool) {
+	_, exists = us.d[value]
+	return
+}
+
+// ContainsAll returns whether the set contains all given values
+func (us *unsafeSet) ContainsAll(values []string) bool {
+	for _, s := range values {
+		if !us.Contains(s) {
+			return false
+		}
+	}
+	return true
+}
+
+// Equals returns whether the contents of two sets are identical
+func (us *unsafeSet) Equals(other Set) bool {
+	v1 := sort.StringSlice(us.Values())
+	v2 := sort.StringSlice(other.Values())
+	v1.Sort()
+	v2.Sort()
+	return reflect.DeepEqual(v1, v2)
+}
+
+// Length returns the number of elements in the set
+func (us *unsafeSet) Length() int {
+	return len(us.d)
+}
+
+// Values returns the values of the Set in an unspecified order.
+func (us *unsafeSet) Values() (values []string) {
+	values = make([]string, 0)
+	for val := range us.d {
+		values = append(values, val)
+	}
+	return
+}
+
+// Copy creates a new Set containing the values of the first
+func (us *unsafeSet) Copy() Set {
+	cp := NewUnsafeSet()
+	for val := range us.d {
+		cp.Add(val)
+	}
+
+	return cp
+}
+
+// Sub removes all elements in other from the set
+func (us *unsafeSet) Sub(other Set) Set {
+	oValues := other.Values()
+	result := us.Copy().(*unsafeSet)
+
+	for _, val := range oValues {
+		if _, ok := result.d[val]; !ok {
+			continue
+		}
+		delete(result.d, val)
+	}
+
+	return result
+}
+
+type tsafeSet struct {
+	us *unsafeSet
+	m  sync.RWMutex
+}
+
+func (ts *tsafeSet) Add(value string) {
+	ts.m.Lock()
+	defer ts.m.Unlock()
+	ts.us.Add(value)
+}
+
+func (ts *tsafeSet) Remove(value string) {
+	ts.m.Lock()
+	defer ts.m.Unlock()
+	ts.us.Remove(value)
+}
+
+func (ts *tsafeSet) Contains(value string) (exists bool) {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	return ts.us.Contains(value)
+}
+
+func (ts *tsafeSet) Equals(other Set) bool {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	return ts.us.Equals(other)
+}
+
+func (ts *tsafeSet) Length() int {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	return ts.us.Length()
+}
+
+func (ts *tsafeSet) Values() (values []string) {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	return ts.us.Values()
+}
+
+func (ts *tsafeSet) Copy() Set {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	usResult := ts.us.Copy().(*unsafeSet)
+	return &tsafeSet{usResult, sync.RWMutex{}}
+}
+
+func (ts *tsafeSet) Sub(other Set) Set {
+	ts.m.RLock()
+	defer ts.m.RUnlock()
+	usResult := ts.us.Sub(other).(*unsafeSet)
+	return &tsafeSet{usResult, sync.RWMutex{}}
+}

+ 186 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go

@@ -0,0 +1,186 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"sort"
+	"testing"
+)
+
+func TestUnsafeSet(t *testing.T) {
+	driveSetTests(t, NewUnsafeSet())
+}
+
+func TestThreadsafeSet(t *testing.T) {
+	driveSetTests(t, NewThreadsafeSet())
+}
+
+// Check that two slices contents are equal; order is irrelevant
+func equal(a, b []string) bool {
+	as := sort.StringSlice(a)
+	bs := sort.StringSlice(b)
+	as.Sort()
+	bs.Sort()
+	return reflect.DeepEqual(as, bs)
+}
+
+func driveSetTests(t *testing.T, s Set) {
+	// Verify operations on an empty set
+	eValues := []string{}
+	values := s.Values()
+	if !reflect.DeepEqual(values, eValues) {
+		t.Fatalf("Expect values=%v got %v", eValues, values)
+	}
+	if l := s.Length(); l != 0 {
+		t.Fatalf("Expected length=0, got %d", l)
+	}
+	for _, v := range []string{"foo", "bar", "baz"} {
+		if s.Contains(v) {
+			t.Fatalf("Expect s.Contains(%q) to be fale, got true", v)
+		}
+	}
+
+	// Add three items, ensure they show up
+	s.Add("foo")
+	s.Add("bar")
+	s.Add("baz")
+
+	eValues = []string{"foo", "bar", "baz"}
+	values = s.Values()
+	if !equal(values, eValues) {
+		t.Fatalf("Expect values=%v got %v", eValues, values)
+	}
+
+	for _, v := range eValues {
+		if !s.Contains(v) {
+			t.Fatalf("Expect s.Contains(%q) to be true, got false", v)
+		}
+	}
+
+	if l := s.Length(); l != 3 {
+		t.Fatalf("Expected length=3, got %d", l)
+	}
+
+	// Add the same item a second time, ensuring it is not duplicated
+	s.Add("foo")
+
+	values = s.Values()
+	if !equal(values, eValues) {
+		t.Fatalf("Expect values=%v got %v", eValues, values)
+	}
+	if l := s.Length(); l != 3 {
+		t.Fatalf("Expected length=3, got %d", l)
+	}
+
+	// Remove all items, ensure they are gone
+	s.Remove("foo")
+	s.Remove("bar")
+	s.Remove("baz")
+
+	eValues = []string{}
+	values = s.Values()
+	if !equal(values, eValues) {
+		t.Fatalf("Expect values=%v got %v", eValues, values)
+	}
+
+	if l := s.Length(); l != 0 {
+		t.Fatalf("Expected length=0, got %d", l)
+	}
+
+	// Create new copies of the set, and ensure they are unlinked to the
+	// original Set by making modifications
+	s.Add("foo")
+	s.Add("bar")
+	cp1 := s.Copy()
+	cp2 := s.Copy()
+	s.Remove("foo")
+	cp3 := s.Copy()
+	cp1.Add("baz")
+
+	for i, tt := range []struct {
+		want []string
+		got  []string
+	}{
+		{[]string{"bar"}, s.Values()},
+		{[]string{"foo", "bar", "baz"}, cp1.Values()},
+		{[]string{"foo", "bar"}, cp2.Values()},
+		{[]string{"bar"}, cp3.Values()},
+	} {
+		if !equal(tt.want, tt.got) {
+			t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got)
+		}
+	}
+
+	for i, tt := range []struct {
+		want bool
+		got  bool
+	}{
+		{true, s.Equals(cp3)},
+		{true, cp3.Equals(s)},
+		{false, s.Equals(cp2)},
+		{false, s.Equals(cp1)},
+		{false, cp1.Equals(s)},
+		{false, cp2.Equals(s)},
+		{false, cp2.Equals(cp1)},
+	} {
+		if tt.got != tt.want {
+			t.Fatalf("case %d: want %t, got %t", i, tt.want, tt.got)
+
+		}
+	}
+
+	// Subtract values from a Set, ensuring a new Set is created and
+	// the original Sets are unmodified
+	sub1 := cp1.Sub(s)
+	sub2 := cp2.Sub(cp1)
+
+	for i, tt := range []struct {
+		want []string
+		got  []string
+	}{
+		{[]string{"foo", "bar", "baz"}, cp1.Values()},
+		{[]string{"foo", "bar"}, cp2.Values()},
+		{[]string{"bar"}, s.Values()},
+		{[]string{"foo", "baz"}, sub1.Values()},
+		{[]string{}, sub2.Values()},
+	} {
+		if !equal(tt.want, tt.got) {
+			t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got)
+		}
+	}
+}
+
+func TestUnsafeSetContainsAll(t *testing.T) {
+	vals := []string{"foo", "bar", "baz"}
+	s := NewUnsafeSet(vals...)
+
+	tests := []struct {
+		strs     []string
+		wcontain bool
+	}{
+		{[]string{}, true},
+		{vals[:1], true},
+		{vals[:2], true},
+		{vals, true},
+		{[]string{"cuz"}, false},
+		{[]string{vals[0], "cuz"}, false},
+	}
+	for i, tt := range tests {
+		if g := s.ContainsAll(tt.strs); g != tt.wcontain {
+			t.Errorf("#%d: ok = %v, want %v", i, g, tt.wcontain)
+		}
+	}
+}

+ 22 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go

@@ -0,0 +1,22 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+// Uint64Slice implements sort interface
+type Uint64Slice []uint64
+
+func (p Uint64Slice) Len() int           { return len(p) }
+func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] }
+func (p Uint64Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }

+ 30 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go

@@ -0,0 +1,30 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"sort"
+	"testing"
+)
+
+func TestUint64Slice(t *testing.T) {
+	g := Uint64Slice{10, 500, 5, 1, 100, 25}
+	w := Uint64Slice{1, 5, 10, 25, 100, 500}
+	sort.Sort(g)
+	if !reflect.DeepEqual(g, w) {
+		t.Errorf("slice after sort = %#v, want %#v", g, w)
+	}
+}

+ 74 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go

@@ -0,0 +1,74 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"errors"
+	"fmt"
+	"net"
+	"net/url"
+	"sort"
+	"strings"
+)
+
+type URLs []url.URL
+
+func NewURLs(strs []string) (URLs, error) {
+	all := make([]url.URL, len(strs))
+	if len(all) == 0 {
+		return nil, errors.New("no valid URLs given")
+	}
+	for i, in := range strs {
+		in = strings.TrimSpace(in)
+		u, err := url.Parse(in)
+		if err != nil {
+			return nil, err
+		}
+		if u.Scheme != "http" && u.Scheme != "https" {
+			return nil, fmt.Errorf("URL scheme must be http or https: %s", in)
+		}
+		if _, _, err := net.SplitHostPort(u.Host); err != nil {
+			return nil, fmt.Errorf(`URL address does not have the form "host:port": %s`, in)
+		}
+		if u.Path != "" {
+			return nil, fmt.Errorf("URL must not contain a path: %s", in)
+		}
+		all[i] = *u
+	}
+	us := URLs(all)
+	us.Sort()
+
+	return us, nil
+}
+
+func (us URLs) String() string {
+	return strings.Join(us.StringSlice(), ",")
+}
+
+func (us *URLs) Sort() {
+	sort.Sort(us)
+}
+func (us URLs) Len() int           { return len(us) }
+func (us URLs) Less(i, j int) bool { return us[i].String() < us[j].String() }
+func (us URLs) Swap(i, j int)      { us[i], us[j] = us[j], us[i] }
+
+func (us URLs) StringSlice() []string {
+	out := make([]string, len(us))
+	for i := range us {
+		out[i] = us[i].String()
+	}
+
+	return out
+}

+ 169 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go

@@ -0,0 +1,169 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"testing"
+
+	"github.com/coreos/etcd/pkg/testutil"
+)
+
+func TestNewURLs(t *testing.T) {
+	tests := []struct {
+		strs  []string
+		wurls URLs
+	}{
+		{
+			[]string{"http://127.0.0.1:2379"},
+			testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}),
+		},
+		// it can trim space
+		{
+			[]string{"   http://127.0.0.1:2379    "},
+			testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}),
+		},
+		// it does sort
+		{
+			[]string{
+				"http://127.0.0.2:2379",
+				"http://127.0.0.1:2379",
+			},
+			testutil.MustNewURLs(t, []string{
+				"http://127.0.0.1:2379",
+				"http://127.0.0.2:2379",
+			}),
+		},
+	}
+	for i, tt := range tests {
+		urls, _ := NewURLs(tt.strs)
+		if !reflect.DeepEqual(urls, tt.wurls) {
+			t.Errorf("#%d: urls = %+v, want %+v", i, urls, tt.wurls)
+		}
+	}
+}
+
+func TestURLsString(t *testing.T) {
+	tests := []struct {
+		us   URLs
+		wstr string
+	}{
+		{
+			URLs{},
+			"",
+		},
+		{
+			testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}),
+			"http://127.0.0.1:2379",
+		},
+		{
+			testutil.MustNewURLs(t, []string{
+				"http://127.0.0.1:2379",
+				"http://127.0.0.2:2379",
+			}),
+			"http://127.0.0.1:2379,http://127.0.0.2:2379",
+		},
+		{
+			testutil.MustNewURLs(t, []string{
+				"http://127.0.0.2:2379",
+				"http://127.0.0.1:2379",
+			}),
+			"http://127.0.0.2:2379,http://127.0.0.1:2379",
+		},
+	}
+	for i, tt := range tests {
+		g := tt.us.String()
+		if g != tt.wstr {
+			t.Errorf("#%d: string = %s, want %s", i, g, tt.wstr)
+		}
+	}
+}
+
+func TestURLsSort(t *testing.T) {
+	g := testutil.MustNewURLs(t, []string{
+		"http://127.0.0.4:2379",
+		"http://127.0.0.2:2379",
+		"http://127.0.0.1:2379",
+		"http://127.0.0.3:2379",
+	})
+	w := testutil.MustNewURLs(t, []string{
+		"http://127.0.0.1:2379",
+		"http://127.0.0.2:2379",
+		"http://127.0.0.3:2379",
+		"http://127.0.0.4:2379",
+	})
+	gurls := URLs(g)
+	gurls.Sort()
+	if !reflect.DeepEqual(g, w) {
+		t.Errorf("URLs after sort = %#v, want %#v", g, w)
+	}
+}
+
+func TestURLsStringSlice(t *testing.T) {
+	tests := []struct {
+		us   URLs
+		wstr []string
+	}{
+		{
+			URLs{},
+			[]string{},
+		},
+		{
+			testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}),
+			[]string{"http://127.0.0.1:2379"},
+		},
+		{
+			testutil.MustNewURLs(t, []string{
+				"http://127.0.0.1:2379",
+				"http://127.0.0.2:2379",
+			}),
+			[]string{"http://127.0.0.1:2379", "http://127.0.0.2:2379"},
+		},
+		{
+			testutil.MustNewURLs(t, []string{
+				"http://127.0.0.2:2379",
+				"http://127.0.0.1:2379",
+			}),
+			[]string{"http://127.0.0.2:2379", "http://127.0.0.1:2379"},
+		},
+	}
+	for i, tt := range tests {
+		g := tt.us.StringSlice()
+		if !reflect.DeepEqual(g, tt.wstr) {
+			t.Errorf("#%d: string slice = %+v, want %+v", i, g, tt.wstr)
+		}
+	}
+}
+
+func TestNewURLsFail(t *testing.T) {
+	tests := [][]string{
+		// no urls given
+		{},
+		// missing protocol scheme
+		{"://127.0.0.1:2379"},
+		// unsupported scheme
+		{"mailto://127.0.0.1:2379"},
+		// not conform to host:port
+		{"http://127.0.0.1"},
+		// contain a path
+		{"http://127.0.0.1:2379/path"},
+	}
+	for i, tt := range tests {
+		_, err := NewURLs(tt)
+		if err == nil {
+			t.Errorf("#%d: err = nil, but error", i)
+		}
+	}
+}

+ 75 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go

@@ -0,0 +1,75 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"fmt"
+	"net/url"
+	"sort"
+	"strings"
+)
+
+type URLsMap map[string]URLs
+
+// NewURLsMap returns a URLsMap instantiated from the given string,
+// which consists of discovery-formatted names-to-URLs, like:
+// mach0=http://1.1.1.1:2380,mach0=http://2.2.2.2::2380,mach1=http://3.3.3.3:2380,mach2=http://4.4.4.4:2380
+func NewURLsMap(s string) (URLsMap, error) {
+	cl := URLsMap{}
+	v, err := url.ParseQuery(strings.Replace(s, ",", "&", -1))
+	if err != nil {
+		return nil, err
+	}
+	for name, urls := range v {
+		if len(urls) == 0 || urls[0] == "" {
+			return nil, fmt.Errorf("empty URL given for %q", name)
+		}
+		us, err := NewURLs(urls)
+		if err != nil {
+			return nil, err
+		}
+		cl[name] = us
+	}
+	return cl, nil
+}
+
+// String returns NameURLPairs into discovery-formatted name-to-URLs sorted by name.
+func (c URLsMap) String() string {
+	pairs := make([]string, 0)
+	for name, urls := range c {
+		for _, url := range urls {
+			pairs = append(pairs, fmt.Sprintf("%s=%s", name, url.String()))
+		}
+	}
+	sort.Strings(pairs)
+	return strings.Join(pairs, ",")
+}
+
+// URLs returns a list of all URLs.
+// The returned list is sorted in ascending lexicographical order.
+func (c URLsMap) URLs() []string {
+	urls := make([]string, 0)
+	for _, us := range c {
+		for _, u := range us {
+			urls = append(urls, u.String())
+		}
+	}
+	sort.Strings(urls)
+	return urls
+}
+
+func (c URLsMap) Len() int {
+	return len(c)
+}

+ 69 - 0
libnetwork/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go

@@ -0,0 +1,69 @@
+// Copyright 2015 CoreOS, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+	"reflect"
+	"testing"
+
+	"github.com/coreos/etcd/pkg/testutil"
+)
+
+func TestParseInitialCluster(t *testing.T) {
+	c, err := NewURLsMap("mem1=http://10.0.0.1:2379,mem1=http://128.193.4.20:2379,mem2=http://10.0.0.2:2379,default=http://127.0.0.1:2379")
+	if err != nil {
+		t.Fatalf("unexpected parse error: %v", err)
+	}
+	wc := URLsMap(map[string]URLs{
+		"mem1":    testutil.MustNewURLs(t, []string{"http://10.0.0.1:2379", "http://128.193.4.20:2379"}),
+		"mem2":    testutil.MustNewURLs(t, []string{"http://10.0.0.2:2379"}),
+		"default": testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}),
+	})
+	if !reflect.DeepEqual(c, wc) {
+		t.Errorf("cluster = %+v, want %+v", c, wc)
+	}
+}
+
+func TestParseInitialClusterBad(t *testing.T) {
+	tests := []string{
+		// invalid URL
+		"%^",
+		// no URL defined for member
+		"mem1=,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379",
+		"mem1,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379",
+		// bad URL for member
+		"default=http://localhost/",
+	}
+	for i, tt := range tests {
+		if _, err := NewURLsMap(tt); err == nil {
+			t.Errorf("#%d: unexpected successful parse, want err", i)
+		}
+	}
+}
+
+func TestNameURLPairsString(t *testing.T) {
+	cls := URLsMap(map[string]URLs{
+		"abc": testutil.MustNewURLs(t, []string{"http://1.1.1.1:1111", "http://0.0.0.0:0000"}),
+		"def": testutil.MustNewURLs(t, []string{"http://2.2.2.2:2222"}),
+		"ghi": testutil.MustNewURLs(t, []string{"http://3.3.3.3:1234", "http://127.0.0.1:2380"}),
+		// no PeerURLs = not included
+		"four": testutil.MustNewURLs(t, []string{}),
+		"five": testutil.MustNewURLs(t, nil),
+	})
+	w := "abc=http://0.0.0.0:0000,abc=http://1.1.1.1:1111,def=http://2.2.2.2:2222,ghi=http://127.0.0.1:2380,ghi=http://3.3.3.3:1234"
+	if g := cls.String(); g != w {
+		t.Fatalf("NameURLPairs.String():\ngot  %#v\nwant %#v", g, w)
+	}
+}

+ 0 - 23
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/add_child.go

@@ -1,23 +0,0 @@
-package etcd
-
-// Add a new directory with a random etcd-generated key under the given path.
-func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) {
-	raw, err := c.post(key, "", ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// Add a new file with a random etcd-generated key under the given path.
-func (c *Client) AddChild(key string, value string, ttl uint64) (*Response, error) {
-	raw, err := c.post(key, value, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}

+ 0 - 73
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/add_child_test.go

@@ -1,73 +0,0 @@
-package etcd
-
-import "testing"
-
-func TestAddChild(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("fooDir", true)
-		c.Delete("nonexistentDir", true)
-	}()
-
-	c.CreateDir("fooDir", 5)
-
-	_, err := c.AddChild("fooDir", "v0", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	_, err = c.AddChild("fooDir", "v1", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	resp, err := c.Get("fooDir", true, false)
-	// The child with v0 should proceed the child with v1 because it's added
-	// earlier, so it should have a lower key.
-	if !(len(resp.Node.Nodes) == 2 && (resp.Node.Nodes[0].Value == "v0" && resp.Node.Nodes[1].Value == "v1")) {
-		t.Fatalf("AddChild 1 failed.  There should be two chlidren whose values are v0 and v1, respectively."+
-			"  The response was: %#v", resp)
-	}
-
-	// Creating a child under a nonexistent directory should succeed.
-	// The directory should be created.
-	resp, err = c.AddChild("nonexistentDir", "foo", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-}
-
-func TestAddChildDir(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("fooDir", true)
-		c.Delete("nonexistentDir", true)
-	}()
-
-	c.CreateDir("fooDir", 5)
-
-	_, err := c.AddChildDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	_, err = c.AddChildDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	resp, err := c.Get("fooDir", true, false)
-	// The child with v0 should proceed the child with v1 because it's added
-	// earlier, so it should have a lower key.
-	if !(len(resp.Node.Nodes) == 2 && (len(resp.Node.Nodes[0].Nodes) == 0 && len(resp.Node.Nodes[1].Nodes) == 0)) {
-		t.Fatalf("AddChildDir 1 failed.  There should be two chlidren whose values are v0 and v1, respectively."+
-			"  The response was: %#v", resp)
-	}
-
-	// Creating a child under a nonexistent directory should succeed.
-	// The directory should be created.
-	resp, err = c.AddChildDir("nonexistentDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-}

+ 0 - 481
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/client.go

@@ -1,481 +0,0 @@
-package etcd
-
-import (
-	"crypto/tls"
-	"crypto/x509"
-	"encoding/json"
-	"errors"
-	"io"
-	"io/ioutil"
-	"math/rand"
-	"net"
-	"net/http"
-	"net/url"
-	"os"
-	"path"
-	"strings"
-	"time"
-)
-
-// See SetConsistency for how to use these constants.
-const (
-	// Using strings rather than iota because the consistency level
-	// could be persisted to disk, so it'd be better to use
-	// human-readable values.
-	STRONG_CONSISTENCY = "STRONG"
-	WEAK_CONSISTENCY   = "WEAK"
-)
-
-const (
-	defaultBufferSize = 10
-)
-
-func init() {
-	rand.Seed(int64(time.Now().Nanosecond()))
-}
-
-type Config struct {
-	CertFile    string        `json:"certFile"`
-	KeyFile     string        `json:"keyFile"`
-	CaCertFile  []string      `json:"caCertFiles"`
-	DialTimeout time.Duration `json:"timeout"`
-	Consistency string        `json:"consistency"`
-}
-
-type credentials struct {
-	username string
-	password string
-}
-
-type Client struct {
-	config      Config   `json:"config"`
-	cluster     *Cluster `json:"cluster"`
-	httpClient  *http.Client
-	credentials *credentials
-	transport   *http.Transport
-	persistence io.Writer
-	cURLch      chan string
-	// CheckRetry can be used to control the policy for failed requests
-	// and modify the cluster if needed.
-	// The client calls it before sending requests again, and
-	// stops retrying if CheckRetry returns some error. The cases that
-	// this function needs to handle include no response and unexpected
-	// http status code of response.
-	// If CheckRetry is nil, client will call the default one
-	// `DefaultCheckRetry`.
-	// Argument cluster is the etcd.Cluster object that these requests have been made on.
-	// Argument numReqs is the number of http.Requests that have been made so far.
-	// Argument lastResp is the http.Responses from the last request.
-	// Argument err is the reason of the failure.
-	CheckRetry func(cluster *Cluster, numReqs int,
-		lastResp http.Response, err error) error
-}
-
-// NewClient create a basic client that is configured to be used
-// with the given machine list.
-func NewClient(machines []string) *Client {
-	config := Config{
-		// default timeout is one second
-		DialTimeout: time.Second,
-		Consistency: WEAK_CONSISTENCY,
-	}
-
-	client := &Client{
-		cluster: NewCluster(machines),
-		config:  config,
-	}
-
-	client.initHTTPClient()
-	client.saveConfig()
-
-	return client
-}
-
-// NewTLSClient create a basic client with TLS configuration
-func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
-	// overwrite the default machine to use https
-	if len(machines) == 0 {
-		machines = []string{"https://127.0.0.1:4001"}
-	}
-
-	config := Config{
-		// default timeout is one second
-		DialTimeout: time.Second,
-		Consistency: WEAK_CONSISTENCY,
-		CertFile:    cert,
-		KeyFile:     key,
-		CaCertFile:  make([]string, 0),
-	}
-
-	client := &Client{
-		cluster: NewCluster(machines),
-		config:  config,
-	}
-
-	err := client.initHTTPSClient(cert, key)
-	if err != nil {
-		return nil, err
-	}
-
-	err = client.AddRootCA(caCert)
-
-	client.saveConfig()
-
-	return client, nil
-}
-
-// NewClientFromFile creates a client from a given file path.
-// The given file is expected to use the JSON format.
-func NewClientFromFile(fpath string) (*Client, error) {
-	fi, err := os.Open(fpath)
-	if err != nil {
-		return nil, err
-	}
-
-	defer func() {
-		if err := fi.Close(); err != nil {
-			panic(err)
-		}
-	}()
-
-	return NewClientFromReader(fi)
-}
-
-// NewClientFromReader creates a Client configured from a given reader.
-// The configuration is expected to use the JSON format.
-func NewClientFromReader(reader io.Reader) (*Client, error) {
-	c := new(Client)
-
-	b, err := ioutil.ReadAll(reader)
-	if err != nil {
-		return nil, err
-	}
-
-	err = json.Unmarshal(b, c)
-	if err != nil {
-		return nil, err
-	}
-	if c.config.CertFile == "" {
-		c.initHTTPClient()
-	} else {
-		err = c.initHTTPSClient(c.config.CertFile, c.config.KeyFile)
-	}
-
-	if err != nil {
-		return nil, err
-	}
-
-	for _, caCert := range c.config.CaCertFile {
-		if err := c.AddRootCA(caCert); err != nil {
-			return nil, err
-		}
-	}
-
-	return c, nil
-}
-
-// Override the Client's HTTP Transport object
-func (c *Client) SetTransport(tr *http.Transport) {
-	c.httpClient.Transport = tr
-	c.transport = tr
-}
-
-func (c *Client) SetCredentials(username, password string) {
-	c.credentials = &credentials{username, password}
-}
-
-func (c *Client) Close() {
-	c.transport.DisableKeepAlives = true
-	c.transport.CloseIdleConnections()
-}
-
-// initHTTPClient initializes a HTTP client for etcd client
-func (c *Client) initHTTPClient() {
-	c.transport = &http.Transport{
-		Dial: c.dial,
-		TLSClientConfig: &tls.Config{
-			InsecureSkipVerify: true,
-		},
-	}
-	c.httpClient = &http.Client{Transport: c.transport}
-}
-
-// initHTTPClient initializes a HTTPS client for etcd client
-func (c *Client) initHTTPSClient(cert, key string) error {
-	if cert == "" || key == "" {
-		return errors.New("Require both cert and key path")
-	}
-
-	tlsCert, err := tls.LoadX509KeyPair(cert, key)
-	if err != nil {
-		return err
-	}
-
-	tlsConfig := &tls.Config{
-		Certificates:       []tls.Certificate{tlsCert},
-		InsecureSkipVerify: true,
-	}
-
-	tr := &http.Transport{
-		TLSClientConfig: tlsConfig,
-		Dial:            c.dial,
-	}
-
-	c.httpClient = &http.Client{Transport: tr}
-	return nil
-}
-
-// SetPersistence sets a writer to which the config will be
-// written every time it's changed.
-func (c *Client) SetPersistence(writer io.Writer) {
-	c.persistence = writer
-}
-
-// SetConsistency changes the consistency level of the client.
-//
-// When consistency is set to STRONG_CONSISTENCY, all requests,
-// including GET, are sent to the leader.  This means that, assuming
-// the absence of leader failures, GET requests are guaranteed to see
-// the changes made by previous requests.
-//
-// When consistency is set to WEAK_CONSISTENCY, other requests
-// are still sent to the leader, but GET requests are sent to a
-// random server from the server pool.  This reduces the read
-// load on the leader, but it's not guaranteed that the GET requests
-// will see changes made by previous requests (they might have not
-// yet been committed on non-leader servers).
-func (c *Client) SetConsistency(consistency string) error {
-	if !(consistency == STRONG_CONSISTENCY || consistency == WEAK_CONSISTENCY) {
-		return errors.New("The argument must be either STRONG_CONSISTENCY or WEAK_CONSISTENCY.")
-	}
-	c.config.Consistency = consistency
-	return nil
-}
-
-// Sets the DialTimeout value
-func (c *Client) SetDialTimeout(d time.Duration) {
-	c.config.DialTimeout = d
-}
-
-// AddRootCA adds a root CA cert for the etcd client
-func (c *Client) AddRootCA(caCert string) error {
-	if c.httpClient == nil {
-		return errors.New("Client has not been initialized yet!")
-	}
-
-	certBytes, err := ioutil.ReadFile(caCert)
-	if err != nil {
-		return err
-	}
-
-	tr, ok := c.httpClient.Transport.(*http.Transport)
-
-	if !ok {
-		panic("AddRootCA(): Transport type assert should not fail")
-	}
-
-	if tr.TLSClientConfig.RootCAs == nil {
-		caCertPool := x509.NewCertPool()
-		ok = caCertPool.AppendCertsFromPEM(certBytes)
-		if ok {
-			tr.TLSClientConfig.RootCAs = caCertPool
-		}
-		tr.TLSClientConfig.InsecureSkipVerify = false
-	} else {
-		ok = tr.TLSClientConfig.RootCAs.AppendCertsFromPEM(certBytes)
-	}
-
-	if !ok {
-		err = errors.New("Unable to load caCert")
-	}
-
-	c.config.CaCertFile = append(c.config.CaCertFile, caCert)
-	c.saveConfig()
-
-	return err
-}
-
-// SetCluster updates cluster information using the given machine list.
-func (c *Client) SetCluster(machines []string) bool {
-	success := c.internalSyncCluster(machines)
-	return success
-}
-
-func (c *Client) GetCluster() []string {
-	return c.cluster.Machines
-}
-
-// SyncCluster updates the cluster information using the internal machine list.
-func (c *Client) SyncCluster() bool {
-	return c.internalSyncCluster(c.cluster.Machines)
-}
-
-// internalSyncCluster syncs cluster information using the given machine list.
-func (c *Client) internalSyncCluster(machines []string) bool {
-	for _, machine := range machines {
-		httpPath := c.createHttpPath(machine, path.Join(version, "members"))
-		resp, err := c.httpClient.Get(httpPath)
-		if err != nil {
-			// try another machine in the cluster
-			continue
-		}
-
-		if resp.StatusCode != http.StatusOK { // fall-back to old endpoint
-			httpPath := c.createHttpPath(machine, path.Join(version, "machines"))
-			resp, err := c.httpClient.Get(httpPath)
-			if err != nil {
-				// try another machine in the cluster
-				continue
-			}
-			b, err := ioutil.ReadAll(resp.Body)
-			resp.Body.Close()
-			if err != nil {
-				// try another machine in the cluster
-				continue
-			}
-			// update Machines List
-			c.cluster.updateFromStr(string(b))
-		} else {
-			b, err := ioutil.ReadAll(resp.Body)
-			resp.Body.Close()
-			if err != nil {
-				// try another machine in the cluster
-				continue
-			}
-
-			var mCollection memberCollection
-			if err := json.Unmarshal(b, &mCollection); err != nil {
-				// try another machine
-				continue
-			}
-
-			urls := make([]string, 0)
-			for _, m := range mCollection {
-				urls = append(urls, m.ClientURLs...)
-			}
-
-			// update Machines List
-			c.cluster.updateFromStr(strings.Join(urls, ","))
-		}
-
-		logger.Debug("sync.machines ", c.cluster.Machines)
-		c.saveConfig()
-		return true
-	}
-
-	return false
-}
-
-// createHttpPath creates a complete HTTP URL.
-// serverName should contain both the host name and a port number, if any.
-func (c *Client) createHttpPath(serverName string, _path string) string {
-	u, err := url.Parse(serverName)
-	if err != nil {
-		panic(err)
-	}
-
-	u.Path = path.Join(u.Path, _path)
-
-	if u.Scheme == "" {
-		u.Scheme = "http"
-	}
-	return u.String()
-}
-
-// dial attempts to open a TCP connection to the provided address, explicitly
-// enabling keep-alives with a one-second interval.
-func (c *Client) dial(network, addr string) (net.Conn, error) {
-	conn, err := net.DialTimeout(network, addr, c.config.DialTimeout)
-	if err != nil {
-		return nil, err
-	}
-
-	tcpConn, ok := conn.(*net.TCPConn)
-	if !ok {
-		return nil, errors.New("Failed type-assertion of net.Conn as *net.TCPConn")
-	}
-
-	// Keep TCP alive to check whether or not the remote machine is down
-	if err = tcpConn.SetKeepAlive(true); err != nil {
-		return nil, err
-	}
-
-	if err = tcpConn.SetKeepAlivePeriod(time.Second); err != nil {
-		return nil, err
-	}
-
-	return tcpConn, nil
-}
-
-func (c *Client) OpenCURL() {
-	c.cURLch = make(chan string, defaultBufferSize)
-}
-
-func (c *Client) CloseCURL() {
-	c.cURLch = nil
-}
-
-func (c *Client) sendCURL(command string) {
-	go func() {
-		select {
-		case c.cURLch <- command:
-		default:
-		}
-	}()
-}
-
-func (c *Client) RecvCURL() string {
-	return <-c.cURLch
-}
-
-// saveConfig saves the current config using c.persistence.
-func (c *Client) saveConfig() error {
-	if c.persistence != nil {
-		b, err := json.Marshal(c)
-		if err != nil {
-			return err
-		}
-
-		_, err = c.persistence.Write(b)
-		if err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// MarshalJSON implements the Marshaller interface
-// as defined by the standard JSON package.
-func (c *Client) MarshalJSON() ([]byte, error) {
-	b, err := json.Marshal(struct {
-		Config  Config   `json:"config"`
-		Cluster *Cluster `json:"cluster"`
-	}{
-		Config:  c.config,
-		Cluster: c.cluster,
-	})
-
-	if err != nil {
-		return nil, err
-	}
-
-	return b, nil
-}
-
-// UnmarshalJSON implements the Unmarshaller interface
-// as defined by the standard JSON package.
-func (c *Client) UnmarshalJSON(b []byte) error {
-	temp := struct {
-		Config  Config   `json:"config"`
-		Cluster *Cluster `json:"cluster"`
-	}{}
-	err := json.Unmarshal(b, &temp)
-	if err != nil {
-		return err
-	}
-
-	c.cluster = temp.Cluster
-	c.config = temp.Config
-	return nil
-}

+ 0 - 108
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/client_test.go

@@ -1,108 +0,0 @@
-package etcd
-
-import (
-	"encoding/json"
-	"fmt"
-	"net"
-	"net/url"
-	"os"
-	"testing"
-)
-
-// To pass this test, we need to create a cluster of 3 machines
-// The server should be listening on localhost:4001, 4002, 4003
-func TestSync(t *testing.T) {
-	fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
-
-	// Explicit trailing slash to ensure this doesn't reproduce:
-	// https://github.com/coreos/go-etcd/issues/82
-	c := NewClient([]string{"http://127.0.0.1:4001/"})
-
-	success := c.SyncCluster()
-	if !success {
-		t.Fatal("cannot sync machines")
-	}
-
-	for _, m := range c.GetCluster() {
-		u, err := url.Parse(m)
-		if err != nil {
-			t.Fatal(err)
-		}
-		if u.Scheme != "http" {
-			t.Fatal("scheme must be http")
-		}
-
-		host, _, err := net.SplitHostPort(u.Host)
-		if err != nil {
-			t.Fatal(err)
-		}
-		if host != "localhost" {
-			t.Fatal("Host must be localhost")
-		}
-	}
-
-	badMachines := []string{"abc", "edef"}
-
-	success = c.SetCluster(badMachines)
-
-	if success {
-		t.Fatal("should not sync on bad machines")
-	}
-
-	goodMachines := []string{"127.0.0.1:4002"}
-
-	success = c.SetCluster(goodMachines)
-
-	if !success {
-		t.Fatal("cannot sync machines")
-	} else {
-		fmt.Println(c.cluster.Machines)
-	}
-
-}
-
-func TestPersistence(t *testing.T) {
-	c := NewClient(nil)
-	c.SyncCluster()
-
-	fo, err := os.Create("config.json")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer func() {
-		if err := fo.Close(); err != nil {
-			panic(err)
-		}
-	}()
-
-	c.SetPersistence(fo)
-	err = c.saveConfig()
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	c2, err := NewClientFromFile("config.json")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// Verify that the two clients have the same config
-	b1, _ := json.Marshal(c)
-	b2, _ := json.Marshal(c2)
-
-	if string(b1) != string(b2) {
-		t.Fatalf("The two configs should be equal!")
-	}
-}
-
-func TestClientRetry(t *testing.T) {
-	c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
-	// use first endpoint as the picked url
-	c.cluster.picked = 0
-	if _, err := c.Set("foo", "bar", 5); err != nil {
-		t.Fatal(err)
-	}
-	if _, err := c.Delete("foo", true); err != nil {
-		t.Fatal(err)
-	}
-}

+ 0 - 37
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/cluster.go

@@ -1,37 +0,0 @@
-package etcd
-
-import (
-	"math/rand"
-	"strings"
-)
-
-type Cluster struct {
-	Leader   string   `json:"leader"`
-	Machines []string `json:"machines"`
-	picked   int
-}
-
-func NewCluster(machines []string) *Cluster {
-	// if an empty slice was sent in then just assume HTTP 4001 on localhost
-	if len(machines) == 0 {
-		machines = []string{"http://127.0.0.1:4001"}
-	}
-
-	// default leader and machines
-	return &Cluster{
-		Leader:   "",
-		Machines: machines,
-		picked:   rand.Intn(len(machines)),
-	}
-}
-
-func (cl *Cluster) failure()     { cl.picked = rand.Intn(len(cl.Machines)) }
-func (cl *Cluster) pick() string { return cl.Machines[cl.picked] }
-
-func (cl *Cluster) updateFromStr(machines string) {
-	cl.Machines = strings.Split(machines, ",")
-	for i := range cl.Machines {
-		cl.Machines[i] = strings.TrimSpace(cl.Machines[i])
-	}
-	cl.picked = rand.Intn(len(cl.Machines))
-}

+ 0 - 34
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_delete.go

@@ -1,34 +0,0 @@
-package etcd
-
-import "fmt"
-
-func (c *Client) CompareAndDelete(key string, prevValue string, prevIndex uint64) (*Response, error) {
-	raw, err := c.RawCompareAndDelete(key, prevValue, prevIndex)
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-func (c *Client) RawCompareAndDelete(key string, prevValue string, prevIndex uint64) (*RawResponse, error) {
-	if prevValue == "" && prevIndex == 0 {
-		return nil, fmt.Errorf("You must give either prevValue or prevIndex.")
-	}
-
-	options := Options{}
-	if prevValue != "" {
-		options["prevValue"] = prevValue
-	}
-	if prevIndex != 0 {
-		options["prevIndex"] = prevIndex
-	}
-
-	raw, err := c.delete(key, options)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw, err
-}

+ 0 - 46
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_delete_test.go

@@ -1,46 +0,0 @@
-package etcd
-
-import (
-	"testing"
-)
-
-func TestCompareAndDelete(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	c.Set("foo", "bar", 5)
-
-	// This should succeed an correct prevValue
-	resp, err := c.CompareAndDelete("foo", "bar", 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.PrevNode.Value == "bar" && resp.PrevNode.Key == "/foo" && resp.PrevNode.TTL == 5) {
-		t.Fatalf("CompareAndDelete 1 prevNode failed: %#v", resp)
-	}
-
-	resp, _ = c.Set("foo", "bar", 5)
-	// This should fail because it gives an incorrect prevValue
-	_, err = c.CompareAndDelete("foo", "xxx", 0)
-	if err == nil {
-		t.Fatalf("CompareAndDelete 2 should have failed.  The response is: %#v", resp)
-	}
-
-	// This should succeed because it gives an correct prevIndex
-	resp, err = c.CompareAndDelete("foo", "", resp.Node.ModifiedIndex)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.PrevNode.Value == "bar" && resp.PrevNode.Key == "/foo" && resp.PrevNode.TTL == 5) {
-		t.Fatalf("CompareAndSwap 3 prevNode failed: %#v", resp)
-	}
-
-	c.Set("foo", "bar", 5)
-	// This should fail because it gives an incorrect prevIndex
-	resp, err = c.CompareAndDelete("foo", "", 29817514)
-	if err == nil {
-		t.Fatalf("CompareAndDelete 4 should have failed.  The response is: %#v", resp)
-	}
-}

+ 0 - 36
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_swap.go

@@ -1,36 +0,0 @@
-package etcd
-
-import "fmt"
-
-func (c *Client) CompareAndSwap(key string, value string, ttl uint64,
-	prevValue string, prevIndex uint64) (*Response, error) {
-	raw, err := c.RawCompareAndSwap(key, value, ttl, prevValue, prevIndex)
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-func (c *Client) RawCompareAndSwap(key string, value string, ttl uint64,
-	prevValue string, prevIndex uint64) (*RawResponse, error) {
-	if prevValue == "" && prevIndex == 0 {
-		return nil, fmt.Errorf("You must give either prevValue or prevIndex.")
-	}
-
-	options := Options{}
-	if prevValue != "" {
-		options["prevValue"] = prevValue
-	}
-	if prevIndex != 0 {
-		options["prevIndex"] = prevIndex
-	}
-
-	raw, err := c.put(key, value, ttl, options)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw, err
-}

+ 0 - 57
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/compare_and_swap_test.go

@@ -1,57 +0,0 @@
-package etcd
-
-import (
-	"testing"
-)
-
-func TestCompareAndSwap(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	c.Set("foo", "bar", 5)
-
-	// This should succeed
-	resp, err := c.CompareAndSwap("foo", "bar2", 5, "bar", 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Value == "bar2" && resp.Node.Key == "/foo" && resp.Node.TTL == 5) {
-		t.Fatalf("CompareAndSwap 1 failed: %#v", resp)
-	}
-
-	if !(resp.PrevNode.Value == "bar" && resp.PrevNode.Key == "/foo" && resp.PrevNode.TTL == 5) {
-		t.Fatalf("CompareAndSwap 1 prevNode failed: %#v", resp)
-	}
-
-	// This should fail because it gives an incorrect prevValue
-	resp, err = c.CompareAndSwap("foo", "bar3", 5, "xxx", 0)
-	if err == nil {
-		t.Fatalf("CompareAndSwap 2 should have failed.  The response is: %#v", resp)
-	}
-
-	resp, err = c.Set("foo", "bar", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// This should succeed
-	resp, err = c.CompareAndSwap("foo", "bar2", 5, "", resp.Node.ModifiedIndex)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Value == "bar2" && resp.Node.Key == "/foo" && resp.Node.TTL == 5) {
-		t.Fatalf("CompareAndSwap 3 failed: %#v", resp)
-	}
-
-	if !(resp.PrevNode.Value == "bar" && resp.PrevNode.Key == "/foo" && resp.PrevNode.TTL == 5) {
-		t.Fatalf("CompareAndSwap 3 prevNode failed: %#v", resp)
-	}
-
-	// This should fail because it gives an incorrect prevIndex
-	resp, err = c.CompareAndSwap("foo", "bar3", 5, "", 29817514)
-	if err == nil {
-		t.Fatalf("CompareAndSwap 4 should have failed.  The response is: %#v", resp)
-	}
-}

+ 0 - 55
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/debug.go

@@ -1,55 +0,0 @@
-package etcd
-
-import (
-	"fmt"
-	"io/ioutil"
-	"log"
-	"strings"
-)
-
-var logger *etcdLogger
-
-func SetLogger(l *log.Logger) {
-	logger = &etcdLogger{l}
-}
-
-func GetLogger() *log.Logger {
-	return logger.log
-}
-
-type etcdLogger struct {
-	log *log.Logger
-}
-
-func (p *etcdLogger) Debug(args ...interface{}) {
-	msg := "DEBUG: " + fmt.Sprint(args...)
-	p.log.Println(msg)
-}
-
-func (p *etcdLogger) Debugf(f string, args ...interface{}) {
-	msg := "DEBUG: " + fmt.Sprintf(f, args...)
-	// Append newline if necessary
-	if !strings.HasSuffix(msg, "\n") {
-		msg = msg + "\n"
-	}
-	p.log.Print(msg)
-}
-
-func (p *etcdLogger) Warning(args ...interface{}) {
-	msg := "WARNING: " + fmt.Sprint(args...)
-	p.log.Println(msg)
-}
-
-func (p *etcdLogger) Warningf(f string, args ...interface{}) {
-	msg := "WARNING: " + fmt.Sprintf(f, args...)
-	// Append newline if necessary
-	if !strings.HasSuffix(msg, "\n") {
-		msg = msg + "\n"
-	}
-	p.log.Print(msg)
-}
-
-func init() {
-	// Default logger uses the go default log.
-	SetLogger(log.New(ioutil.Discard, "go-etcd", log.LstdFlags))
-}

+ 0 - 28
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/debug_test.go

@@ -1,28 +0,0 @@
-package etcd
-
-import (
-	"testing"
-)
-
-type Foo struct{}
-type Bar struct {
-	one string
-	two int
-}
-
-// Tests that logs don't panic with arbitrary interfaces
-func TestDebug(t *testing.T) {
-	f := &Foo{}
-	b := &Bar{"asfd", 3}
-	for _, test := range []interface{}{
-		1234,
-		"asdf",
-		f,
-		b,
-	} {
-		logger.Debug(test)
-		logger.Debugf("something, %s", test)
-		logger.Warning(test)
-		logger.Warningf("something, %s", test)
-	}
-}

+ 0 - 40
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/delete.go

@@ -1,40 +0,0 @@
-package etcd
-
-// Delete deletes the given key.
-//
-// When recursive set to false, if the key points to a
-// directory the method will fail.
-//
-// When recursive set to true, if the key points to a file,
-// the file will be deleted; if the key points to a directory,
-// then everything under the directory (including all child directories)
-// will be deleted.
-func (c *Client) Delete(key string, recursive bool) (*Response, error) {
-	raw, err := c.RawDelete(key, recursive, false)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// DeleteDir deletes an empty directory or a key value pair
-func (c *Client) DeleteDir(key string) (*Response, error) {
-	raw, err := c.RawDelete(key, false, true)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-func (c *Client) RawDelete(key string, recursive bool, dir bool) (*RawResponse, error) {
-	ops := Options{
-		"recursive": recursive,
-		"dir":       dir,
-	}
-
-	return c.delete(key, ops)
-}

+ 0 - 81
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/delete_test.go

@@ -1,81 +0,0 @@
-package etcd
-
-import (
-	"testing"
-)
-
-func TestDelete(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	c.Set("foo", "bar", 5)
-	resp, err := c.Delete("foo", false)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Node.Value == "") {
-		t.Fatalf("Delete failed with %s", resp.Node.Value)
-	}
-
-	if !(resp.PrevNode.Value == "bar") {
-		t.Fatalf("Delete PrevNode failed with %s", resp.Node.Value)
-	}
-
-	resp, err = c.Delete("foo", false)
-	if err == nil {
-		t.Fatalf("Delete should have failed because the key foo did not exist.  "+
-			"The response was: %v", resp)
-	}
-}
-
-func TestDeleteAll(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-		c.Delete("fooDir", true)
-	}()
-
-	c.SetDir("foo", 5)
-	// test delete an empty dir
-	resp, err := c.DeleteDir("foo")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Node.Value == "") {
-		t.Fatalf("DeleteAll 1 failed: %#v", resp)
-	}
-
-	if !(resp.PrevNode.Dir == true && resp.PrevNode.Value == "") {
-		t.Fatalf("DeleteAll 1 PrevNode failed: %#v", resp)
-	}
-
-	c.CreateDir("fooDir", 5)
-	c.Set("fooDir/foo", "bar", 5)
-	_, err = c.DeleteDir("fooDir")
-	if err == nil {
-		t.Fatal("should not able to delete a non-empty dir with deletedir")
-	}
-
-	resp, err = c.Delete("fooDir", true)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Node.Value == "") {
-		t.Fatalf("DeleteAll 2 failed: %#v", resp)
-	}
-
-	if !(resp.PrevNode.Dir == true && resp.PrevNode.Value == "") {
-		t.Fatalf("DeleteAll 2 PrevNode failed: %#v", resp)
-	}
-
-	resp, err = c.Delete("foo", true)
-	if err == nil {
-		t.Fatalf("DeleteAll should have failed because the key foo did not exist.  "+
-			"The response was: %v", resp)
-	}
-}

+ 0 - 49
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/error.go

@@ -1,49 +0,0 @@
-package etcd
-
-import (
-	"encoding/json"
-	"fmt"
-)
-
-const (
-	ErrCodeEtcdNotReachable    = 501
-	ErrCodeUnhandledHTTPStatus = 502
-)
-
-var (
-	errorMap = map[int]string{
-		ErrCodeEtcdNotReachable: "All the given peers are not reachable",
-	}
-)
-
-type EtcdError struct {
-	ErrorCode int    `json:"errorCode"`
-	Message   string `json:"message"`
-	Cause     string `json:"cause,omitempty"`
-	Index     uint64 `json:"index"`
-}
-
-func (e EtcdError) Error() string {
-	return fmt.Sprintf("%v: %v (%v) [%v]", e.ErrorCode, e.Message, e.Cause, e.Index)
-}
-
-func newError(errorCode int, cause string, index uint64) *EtcdError {
-	return &EtcdError{
-		ErrorCode: errorCode,
-		Message:   errorMap[errorCode],
-		Cause:     cause,
-		Index:     index,
-	}
-}
-
-func handleError(b []byte) error {
-	etcdErr := new(EtcdError)
-
-	err := json.Unmarshal(b, etcdErr)
-	if err != nil {
-		logger.Warningf("cannot unmarshal etcd error: %v", err)
-		return err
-	}
-
-	return etcdErr
-}

+ 0 - 32
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/get.go

@@ -1,32 +0,0 @@
-package etcd
-
-// Get gets the file or directory associated with the given key.
-// If the key points to a directory, files and directories under
-// it will be returned in sorted or unsorted order, depending on
-// the sort flag.
-// If recursive is set to false, contents under child directories
-// will not be returned.
-// If recursive is set to true, all the contents will be returned.
-func (c *Client) Get(key string, sort, recursive bool) (*Response, error) {
-	raw, err := c.RawGet(key, sort, recursive)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-func (c *Client) RawGet(key string, sort, recursive bool) (*RawResponse, error) {
-	var q bool
-	if c.config.Consistency == STRONG_CONSISTENCY {
-		q = true
-	}
-	ops := Options{
-		"recursive": recursive,
-		"sorted":    sort,
-		"quorum":    q,
-	}
-
-	return c.get(key, ops)
-}

+ 0 - 131
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/get_test.go

@@ -1,131 +0,0 @@
-package etcd
-
-import (
-	"reflect"
-	"testing"
-)
-
-// cleanNode scrubs Expiration, ModifiedIndex and CreatedIndex of a node.
-func cleanNode(n *Node) {
-	n.Expiration = nil
-	n.ModifiedIndex = 0
-	n.CreatedIndex = 0
-}
-
-// cleanResult scrubs a result object two levels deep of Expiration,
-// ModifiedIndex and CreatedIndex.
-func cleanResult(result *Response) {
-	//  TODO(philips): make this recursive.
-	cleanNode(result.Node)
-	for i, _ := range result.Node.Nodes {
-		cleanNode(result.Node.Nodes[i])
-		for j, _ := range result.Node.Nodes[i].Nodes {
-			cleanNode(result.Node.Nodes[i].Nodes[j])
-		}
-	}
-}
-
-func TestGet(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	c.Set("foo", "bar", 5)
-
-	result, err := c.Get("foo", false, false)
-
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if result.Node.Key != "/foo" || result.Node.Value != "bar" {
-		t.Fatalf("Get failed with %s %s %v", result.Node.Key, result.Node.Value, result.Node.TTL)
-	}
-
-	result, err = c.Get("goo", false, false)
-	if err == nil {
-		t.Fatalf("should not be able to get non-exist key")
-	}
-}
-
-func TestGetAll(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("fooDir", true)
-	}()
-
-	c.CreateDir("fooDir", 5)
-	c.Set("fooDir/k0", "v0", 5)
-	c.Set("fooDir/k1", "v1", 5)
-
-	// Return kv-pairs in sorted order
-	result, err := c.Get("fooDir", true, false)
-
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	expected := Nodes{
-		&Node{
-			Key:   "/fooDir/k0",
-			Value: "v0",
-			TTL:   5,
-		},
-		&Node{
-			Key:   "/fooDir/k1",
-			Value: "v1",
-			TTL:   5,
-		},
-	}
-
-	cleanResult(result)
-
-	if !reflect.DeepEqual(result.Node.Nodes, expected) {
-		t.Fatalf("(actual) %v != (expected) %v", result.Node.Nodes, expected)
-	}
-
-	// Test the `recursive` option
-	c.CreateDir("fooDir/childDir", 5)
-	c.Set("fooDir/childDir/k2", "v2", 5)
-
-	// Return kv-pairs in sorted order
-	result, err = c.Get("fooDir", true, true)
-
-	cleanResult(result)
-
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	expected = Nodes{
-		&Node{
-			Key: "/fooDir/childDir",
-			Dir: true,
-			Nodes: Nodes{
-				&Node{
-					Key:   "/fooDir/childDir/k2",
-					Value: "v2",
-					TTL:   5,
-				},
-			},
-			TTL: 5,
-		},
-		&Node{
-			Key:   "/fooDir/k0",
-			Value: "v0",
-			TTL:   5,
-		},
-		&Node{
-			Key:   "/fooDir/k1",
-			Value: "v1",
-			TTL:   5,
-		},
-	}
-
-	cleanResult(result)
-
-	if !reflect.DeepEqual(result.Node.Nodes, expected) {
-		t.Fatalf("(actual) %v != (expected) %v", result.Node.Nodes, expected)
-	}
-}

+ 0 - 30
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/member.go

@@ -1,30 +0,0 @@
-package etcd
-
-import "encoding/json"
-
-type Member struct {
-	ID         string   `json:"id"`
-	Name       string   `json:"name"`
-	PeerURLs   []string `json:"peerURLs"`
-	ClientURLs []string `json:"clientURLs"`
-}
-
-type memberCollection []Member
-
-func (c *memberCollection) UnmarshalJSON(data []byte) error {
-	d := struct {
-		Members []Member
-	}{}
-
-	if err := json.Unmarshal(data, &d); err != nil {
-		return err
-	}
-
-	if d.Members == nil {
-		*c = make([]Member, 0)
-		return nil
-	}
-
-	*c = d.Members
-	return nil
-}

+ 0 - 71
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/member_test.go

@@ -1,71 +0,0 @@
-package etcd
-
-import (
-	"encoding/json"
-	"reflect"
-	"testing"
-)
-
-func TestMemberCollectionUnmarshal(t *testing.T) {
-	tests := []struct {
-		body []byte
-		want memberCollection
-	}{
-		{
-			body: []byte(`{"members":[]}`),
-			want: memberCollection([]Member{}),
-		},
-		{
-			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
-			want: memberCollection(
-				[]Member{
-					{
-						ID:   "2745e2525fce8fe",
-						Name: "node3",
-						PeerURLs: []string{
-							"http://127.0.0.1:7003",
-						},
-						ClientURLs: []string{
-							"http://127.0.0.1:4003",
-						},
-					},
-					{
-						ID:   "42134f434382925",
-						Name: "node1",
-						PeerURLs: []string{
-							"http://127.0.0.1:2380",
-							"http://127.0.0.1:7001",
-						},
-						ClientURLs: []string{
-							"http://127.0.0.1:2379",
-							"http://127.0.0.1:4001",
-						},
-					},
-					{
-						ID:   "94088180e21eb87b",
-						Name: "node2",
-						PeerURLs: []string{
-							"http://127.0.0.1:7002",
-						},
-						ClientURLs: []string{
-							"http://127.0.0.1:4002",
-						},
-					},
-				},
-			),
-		},
-	}
-
-	for i, tt := range tests {
-		var got memberCollection
-		err := json.Unmarshal(tt.body, &got)
-		if err != nil {
-			t.Errorf("#%d: unexpected error: %v", i, err)
-			continue
-		}
-
-		if !reflect.DeepEqual(tt.want, got) {
-			t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.want, got)
-		}
-	}
-}

+ 0 - 72
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/options.go

@@ -1,72 +0,0 @@
-package etcd
-
-import (
-	"fmt"
-	"net/url"
-	"reflect"
-)
-
-type Options map[string]interface{}
-
-// An internally-used data structure that represents a mapping
-// between valid options and their kinds
-type validOptions map[string]reflect.Kind
-
-// Valid options for GET, PUT, POST, DELETE
-// Using CAPITALIZED_UNDERSCORE to emphasize that these
-// values are meant to be used as constants.
-var (
-	VALID_GET_OPTIONS = validOptions{
-		"recursive": reflect.Bool,
-		"quorum":    reflect.Bool,
-		"sorted":    reflect.Bool,
-		"wait":      reflect.Bool,
-		"waitIndex": reflect.Uint64,
-	}
-
-	VALID_PUT_OPTIONS = validOptions{
-		"prevValue": reflect.String,
-		"prevIndex": reflect.Uint64,
-		"prevExist": reflect.Bool,
-		"dir":       reflect.Bool,
-	}
-
-	VALID_POST_OPTIONS = validOptions{}
-
-	VALID_DELETE_OPTIONS = validOptions{
-		"recursive": reflect.Bool,
-		"dir":       reflect.Bool,
-		"prevValue": reflect.String,
-		"prevIndex": reflect.Uint64,
-	}
-)
-
-// Convert options to a string of HTML parameters
-func (ops Options) toParameters(validOps validOptions) (string, error) {
-	p := "?"
-	values := url.Values{}
-
-	if ops == nil {
-		return "", nil
-	}
-
-	for k, v := range ops {
-		// Check if the given option is valid (that it exists)
-		kind := validOps[k]
-		if kind == reflect.Invalid {
-			return "", fmt.Errorf("Invalid option: %v", k)
-		}
-
-		// Check if the given option is of the valid type
-		t := reflect.TypeOf(v)
-		if kind != t.Kind() {
-			return "", fmt.Errorf("Option %s should be of %v kind, not of %v kind.",
-				k, kind, t.Kind())
-		}
-
-		values.Set(k, fmt.Sprintf("%v", v))
-	}
-
-	p += values.Encode()
-	return p, nil
-}

+ 0 - 403
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/requests.go

@@ -1,403 +0,0 @@
-package etcd
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/http"
-	"net/url"
-	"path"
-	"strings"
-	"sync"
-	"time"
-)
-
-// Errors introduced by handling requests
-var (
-	ErrRequestCancelled = errors.New("sending request is cancelled")
-)
-
-type RawRequest struct {
-	Method       string
-	RelativePath string
-	Values       url.Values
-	Cancel       <-chan bool
-}
-
-// NewRawRequest returns a new RawRequest
-func NewRawRequest(method, relativePath string, values url.Values, cancel <-chan bool) *RawRequest {
-	return &RawRequest{
-		Method:       method,
-		RelativePath: relativePath,
-		Values:       values,
-		Cancel:       cancel,
-	}
-}
-
-// getCancelable issues a cancelable GET request
-func (c *Client) getCancelable(key string, options Options,
-	cancel <-chan bool) (*RawResponse, error) {
-	logger.Debugf("get %s [%s]", key, c.cluster.pick())
-	p := keyToPath(key)
-
-	str, err := options.toParameters(VALID_GET_OPTIONS)
-	if err != nil {
-		return nil, err
-	}
-	p += str
-
-	req := NewRawRequest("GET", p, nil, cancel)
-	resp, err := c.SendRequest(req)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return resp, nil
-}
-
-// get issues a GET request
-func (c *Client) get(key string, options Options) (*RawResponse, error) {
-	return c.getCancelable(key, options, nil)
-}
-
-// put issues a PUT request
-func (c *Client) put(key string, value string, ttl uint64,
-	options Options) (*RawResponse, error) {
-
-	logger.Debugf("put %s, %s, ttl: %d, [%s]", key, value, ttl, c.cluster.pick())
-	p := keyToPath(key)
-
-	str, err := options.toParameters(VALID_PUT_OPTIONS)
-	if err != nil {
-		return nil, err
-	}
-	p += str
-
-	req := NewRawRequest("PUT", p, buildValues(value, ttl), nil)
-	resp, err := c.SendRequest(req)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return resp, nil
-}
-
-// post issues a POST request
-func (c *Client) post(key string, value string, ttl uint64) (*RawResponse, error) {
-	logger.Debugf("post %s, %s, ttl: %d, [%s]", key, value, ttl, c.cluster.pick())
-	p := keyToPath(key)
-
-	req := NewRawRequest("POST", p, buildValues(value, ttl), nil)
-	resp, err := c.SendRequest(req)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return resp, nil
-}
-
-// delete issues a DELETE request
-func (c *Client) delete(key string, options Options) (*RawResponse, error) {
-	logger.Debugf("delete %s [%s]", key, c.cluster.pick())
-	p := keyToPath(key)
-
-	str, err := options.toParameters(VALID_DELETE_OPTIONS)
-	if err != nil {
-		return nil, err
-	}
-	p += str
-
-	req := NewRawRequest("DELETE", p, nil, nil)
-	resp, err := c.SendRequest(req)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return resp, nil
-}
-
-// SendRequest sends a HTTP request and returns a Response as defined by etcd
-func (c *Client) SendRequest(rr *RawRequest) (*RawResponse, error) {
-	var req *http.Request
-	var resp *http.Response
-	var httpPath string
-	var err error
-	var respBody []byte
-
-	var numReqs = 1
-
-	checkRetry := c.CheckRetry
-	if checkRetry == nil {
-		checkRetry = DefaultCheckRetry
-	}
-
-	cancelled := make(chan bool, 1)
-	reqLock := new(sync.Mutex)
-
-	if rr.Cancel != nil {
-		cancelRoutine := make(chan bool)
-		defer close(cancelRoutine)
-
-		go func() {
-			select {
-			case <-rr.Cancel:
-				cancelled <- true
-				logger.Debug("send.request is cancelled")
-			case <-cancelRoutine:
-				return
-			}
-
-			// Repeat canceling request until this thread is stopped
-			// because we have no idea about whether it succeeds.
-			for {
-				reqLock.Lock()
-				c.httpClient.Transport.(*http.Transport).CancelRequest(req)
-				reqLock.Unlock()
-
-				select {
-				case <-time.After(100 * time.Millisecond):
-				case <-cancelRoutine:
-					return
-				}
-			}
-		}()
-	}
-
-	// If we connect to a follower and consistency is required, retry until
-	// we connect to a leader
-	sleep := 25 * time.Millisecond
-	maxSleep := time.Second
-
-	for attempt := 0; ; attempt++ {
-		if attempt > 0 {
-			select {
-			case <-cancelled:
-				return nil, ErrRequestCancelled
-			case <-time.After(sleep):
-				sleep = sleep * 2
-				if sleep > maxSleep {
-					sleep = maxSleep
-				}
-			}
-		}
-
-		logger.Debug("Connecting to etcd: attempt ", attempt+1, " for ", rr.RelativePath)
-
-		// get httpPath if not set
-		if httpPath == "" {
-			httpPath = c.getHttpPath(rr.RelativePath)
-		}
-
-		// Return a cURL command if curlChan is set
-		if c.cURLch != nil {
-			command := fmt.Sprintf("curl -X %s %s", rr.Method, httpPath)
-			for key, value := range rr.Values {
-				command += fmt.Sprintf(" -d %s=%s", key, value[0])
-			}
-			if c.credentials != nil {
-				command += fmt.Sprintf(" -u %s", c.credentials.username)
-			}
-			c.sendCURL(command)
-		}
-
-		logger.Debug("send.request.to ", httpPath, " | method ", rr.Method)
-
-		req, err := func() (*http.Request, error) {
-			reqLock.Lock()
-			defer reqLock.Unlock()
-
-			if rr.Values == nil {
-				if req, err = http.NewRequest(rr.Method, httpPath, nil); err != nil {
-					return nil, err
-				}
-			} else {
-				body := strings.NewReader(rr.Values.Encode())
-				if req, err = http.NewRequest(rr.Method, httpPath, body); err != nil {
-					return nil, err
-				}
-
-				req.Header.Set("Content-Type",
-					"application/x-www-form-urlencoded; param=value")
-			}
-			return req, nil
-		}()
-
-		if err != nil {
-			return nil, err
-		}
-
-		if c.credentials != nil {
-			req.SetBasicAuth(c.credentials.username, c.credentials.password)
-		}
-
-		resp, err = c.httpClient.Do(req)
-		// clear previous httpPath
-		httpPath = ""
-		defer func() {
-			if resp != nil {
-				resp.Body.Close()
-			}
-		}()
-
-		// If the request was cancelled, return ErrRequestCancelled directly
-		select {
-		case <-cancelled:
-			return nil, ErrRequestCancelled
-		default:
-		}
-
-		numReqs++
-
-		// network error, change a machine!
-		if err != nil {
-			logger.Debug("network error: ", err.Error())
-			lastResp := http.Response{}
-			if checkErr := checkRetry(c.cluster, numReqs, lastResp, err); checkErr != nil {
-				return nil, checkErr
-			}
-
-			c.cluster.failure()
-			continue
-		}
-
-		// if there is no error, it should receive response
-		logger.Debug("recv.response.from ", httpPath)
-
-		if validHttpStatusCode[resp.StatusCode] {
-			// try to read byte code and break the loop
-			respBody, err = ioutil.ReadAll(resp.Body)
-			if err == nil {
-				logger.Debug("recv.success ", httpPath)
-				break
-			}
-			// ReadAll error may be caused due to cancel request
-			select {
-			case <-cancelled:
-				return nil, ErrRequestCancelled
-			default:
-			}
-
-			if err == io.ErrUnexpectedEOF {
-				// underlying connection was closed prematurely, probably by timeout
-				// TODO: empty body or unexpectedEOF can cause http.Transport to get hosed;
-				// this allows the client to detect that and take evasive action. Need
-				// to revisit once code.google.com/p/go/issues/detail?id=8648 gets fixed.
-				respBody = []byte{}
-				break
-			}
-		}
-
-		if resp.StatusCode == http.StatusTemporaryRedirect {
-			u, err := resp.Location()
-
-			if err != nil {
-				logger.Warning(err)
-			} else {
-				// set httpPath for following redirection
-				httpPath = u.String()
-			}
-			resp.Body.Close()
-			continue
-		}
-
-		if checkErr := checkRetry(c.cluster, numReqs, *resp,
-			errors.New("Unexpected HTTP status code")); checkErr != nil {
-			return nil, checkErr
-		}
-		resp.Body.Close()
-	}
-
-	r := &RawResponse{
-		StatusCode: resp.StatusCode,
-		Body:       respBody,
-		Header:     resp.Header,
-	}
-
-	return r, nil
-}
-
-// DefaultCheckRetry defines the retrying behaviour for bad HTTP requests
-// If we have retried 2 * machine number, stop retrying.
-// If status code is InternalServerError, sleep for 200ms.
-func DefaultCheckRetry(cluster *Cluster, numReqs int, lastResp http.Response,
-	err error) error {
-
-	if numReqs > 2*len(cluster.Machines) {
-		errStr := fmt.Sprintf("failed to propose on members %v twice [last error: %v]", cluster.Machines, err)
-		return newError(ErrCodeEtcdNotReachable, errStr, 0)
-	}
-
-	if isEmptyResponse(lastResp) {
-		// always retry if it failed to get response from one machine
-		return nil
-	}
-	if !shouldRetry(lastResp) {
-		body := []byte("nil")
-		if lastResp.Body != nil {
-			if b, err := ioutil.ReadAll(lastResp.Body); err == nil {
-				body = b
-			}
-		}
-		errStr := fmt.Sprintf("unhandled http status [%s] with body [%s]", http.StatusText(lastResp.StatusCode), body)
-		return newError(ErrCodeUnhandledHTTPStatus, errStr, 0)
-	}
-	// sleep some time and expect leader election finish
-	time.Sleep(time.Millisecond * 200)
-	logger.Warning("bad response status code", lastResp.StatusCode)
-	return nil
-}
-
-func isEmptyResponse(r http.Response) bool { return r.StatusCode == 0 }
-
-// shouldRetry returns whether the reponse deserves retry.
-func shouldRetry(r http.Response) bool {
-	// TODO: only retry when the cluster is in leader election
-	// We cannot do it exactly because etcd doesn't support it well.
-	return r.StatusCode == http.StatusInternalServerError
-}
-
-func (c *Client) getHttpPath(s ...string) string {
-	fullPath := c.cluster.pick() + "/" + version
-	for _, seg := range s {
-		fullPath = fullPath + "/" + seg
-	}
-	return fullPath
-}
-
-// buildValues builds a url.Values map according to the given value and ttl
-func buildValues(value string, ttl uint64) url.Values {
-	v := url.Values{}
-
-	if value != "" {
-		v.Set("value", value)
-	}
-
-	if ttl > 0 {
-		v.Set("ttl", fmt.Sprintf("%v", ttl))
-	}
-
-	return v
-}
-
-// convert key string to http path exclude version, including URL escaping
-// for example: key[foo] -> path[keys/foo]
-// key[/%z] -> path[keys/%25z]
-// key[/] -> path[keys/]
-func keyToPath(key string) string {
-	// URL-escape our key, except for slashes
-	p := strings.Replace(url.QueryEscape(path.Join("keys", key)), "%2F", "/", -1)
-
-	// corner case: if key is "/" or "//" ect
-	// path join will clear the tailing "/"
-	// we need to add it back
-	if p == "keys" {
-		p = "keys/"
-	}
-
-	return p
-}

+ 0 - 22
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/requests_test.go

@@ -1,22 +0,0 @@
-package etcd
-
-import "testing"
-
-func TestKeyToPath(t *testing.T) {
-	tests := []struct {
-		key   string
-		wpath string
-	}{
-		{"", "keys/"},
-		{"foo", "keys/foo"},
-		{"foo/bar", "keys/foo/bar"},
-		{"%z", "keys/%25z"},
-		{"/", "keys/"},
-	}
-	for i, tt := range tests {
-		path := keyToPath(tt.key)
-		if path != tt.wpath {
-			t.Errorf("#%d: path = %s, want %s", i, path, tt.wpath)
-		}
-	}
-}

+ 0 - 89
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/response.go

@@ -1,89 +0,0 @@
-package etcd
-
-import (
-	"encoding/json"
-	"net/http"
-	"strconv"
-	"time"
-)
-
-const (
-	rawResponse = iota
-	normalResponse
-)
-
-type responseType int
-
-type RawResponse struct {
-	StatusCode int
-	Body       []byte
-	Header     http.Header
-}
-
-var (
-	validHttpStatusCode = map[int]bool{
-		http.StatusCreated:            true,
-		http.StatusOK:                 true,
-		http.StatusBadRequest:         true,
-		http.StatusNotFound:           true,
-		http.StatusPreconditionFailed: true,
-		http.StatusForbidden:          true,
-	}
-)
-
-// Unmarshal parses RawResponse and stores the result in Response
-func (rr *RawResponse) Unmarshal() (*Response, error) {
-	if rr.StatusCode != http.StatusOK && rr.StatusCode != http.StatusCreated {
-		return nil, handleError(rr.Body)
-	}
-
-	resp := new(Response)
-
-	err := json.Unmarshal(rr.Body, resp)
-
-	if err != nil {
-		return nil, err
-	}
-
-	// attach index and term to response
-	resp.EtcdIndex, _ = strconv.ParseUint(rr.Header.Get("X-Etcd-Index"), 10, 64)
-	resp.RaftIndex, _ = strconv.ParseUint(rr.Header.Get("X-Raft-Index"), 10, 64)
-	resp.RaftTerm, _ = strconv.ParseUint(rr.Header.Get("X-Raft-Term"), 10, 64)
-
-	return resp, nil
-}
-
-type Response struct {
-	Action    string `json:"action"`
-	Node      *Node  `json:"node"`
-	PrevNode  *Node  `json:"prevNode,omitempty"`
-	EtcdIndex uint64 `json:"etcdIndex"`
-	RaftIndex uint64 `json:"raftIndex"`
-	RaftTerm  uint64 `json:"raftTerm"`
-}
-
-type Node struct {
-	Key           string     `json:"key, omitempty"`
-	Value         string     `json:"value,omitempty"`
-	Dir           bool       `json:"dir,omitempty"`
-	Expiration    *time.Time `json:"expiration,omitempty"`
-	TTL           int64      `json:"ttl,omitempty"`
-	Nodes         Nodes      `json:"nodes,omitempty"`
-	ModifiedIndex uint64     `json:"modifiedIndex,omitempty"`
-	CreatedIndex  uint64     `json:"createdIndex,omitempty"`
-}
-
-type Nodes []*Node
-
-// interfaces for sorting
-func (ns Nodes) Len() int {
-	return len(ns)
-}
-
-func (ns Nodes) Less(i, j int) bool {
-	return ns[i].Key < ns[j].Key
-}
-
-func (ns Nodes) Swap(i, j int) {
-	ns[i], ns[j] = ns[j], ns[i]
-}

+ 0 - 42
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_curl_chan_test.go

@@ -1,42 +0,0 @@
-package etcd
-
-import (
-	"fmt"
-	"testing"
-)
-
-func TestSetCurlChan(t *testing.T) {
-	c := NewClient(nil)
-	c.OpenCURL()
-
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	_, err := c.Set("foo", "bar", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	expected := fmt.Sprintf("curl -X PUT %s/v2/keys/foo -d value=bar -d ttl=5",
-		c.cluster.pick())
-	actual := c.RecvCURL()
-	if expected != actual {
-		t.Fatalf(`Command "%s" is not equal to expected value "%s"`,
-			actual, expected)
-	}
-
-	c.SetConsistency(STRONG_CONSISTENCY)
-	_, err = c.Get("foo", false, false)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	expected = fmt.Sprintf("curl -X GET %s/v2/keys/foo?quorum=true&recursive=false&sorted=false",
-		c.cluster.pick())
-	actual = c.RecvCURL()
-	if expected != actual {
-		t.Fatalf(`Command "%s" is not equal to expected value "%s"`,
-			actual, expected)
-	}
-}

+ 0 - 137
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_update_create.go

@@ -1,137 +0,0 @@
-package etcd
-
-// Set sets the given key to the given value.
-// It will create a new key value pair or replace the old one.
-// It will not replace a existing directory.
-func (c *Client) Set(key string, value string, ttl uint64) (*Response, error) {
-	raw, err := c.RawSet(key, value, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// SetDir sets the given key to a directory.
-// It will create a new directory or replace the old key value pair by a directory.
-// It will not replace a existing directory.
-func (c *Client) SetDir(key string, ttl uint64) (*Response, error) {
-	raw, err := c.RawSetDir(key, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// CreateDir creates a directory. It succeeds only if
-// the given key does not yet exist.
-func (c *Client) CreateDir(key string, ttl uint64) (*Response, error) {
-	raw, err := c.RawCreateDir(key, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// UpdateDir updates the given directory. It succeeds only if the
-// given key already exists.
-func (c *Client) UpdateDir(key string, ttl uint64) (*Response, error) {
-	raw, err := c.RawUpdateDir(key, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// Create creates a file with the given value under the given key.  It succeeds
-// only if the given key does not yet exist.
-func (c *Client) Create(key string, value string, ttl uint64) (*Response, error) {
-	raw, err := c.RawCreate(key, value, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// CreateInOrder creates a file with a key that's guaranteed to be higher than other
-// keys in the given directory. It is useful for creating queues.
-func (c *Client) CreateInOrder(dir string, value string, ttl uint64) (*Response, error) {
-	raw, err := c.RawCreateInOrder(dir, value, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-// Update updates the given key to the given value.  It succeeds only if the
-// given key already exists.
-func (c *Client) Update(key string, value string, ttl uint64) (*Response, error) {
-	raw, err := c.RawUpdate(key, value, ttl)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return raw.Unmarshal()
-}
-
-func (c *Client) RawUpdateDir(key string, ttl uint64) (*RawResponse, error) {
-	ops := Options{
-		"prevExist": true,
-		"dir":       true,
-	}
-
-	return c.put(key, "", ttl, ops)
-}
-
-func (c *Client) RawCreateDir(key string, ttl uint64) (*RawResponse, error) {
-	ops := Options{
-		"prevExist": false,
-		"dir":       true,
-	}
-
-	return c.put(key, "", ttl, ops)
-}
-
-func (c *Client) RawSet(key string, value string, ttl uint64) (*RawResponse, error) {
-	return c.put(key, value, ttl, nil)
-}
-
-func (c *Client) RawSetDir(key string, ttl uint64) (*RawResponse, error) {
-	ops := Options{
-		"dir": true,
-	}
-
-	return c.put(key, "", ttl, ops)
-}
-
-func (c *Client) RawUpdate(key string, value string, ttl uint64) (*RawResponse, error) {
-	ops := Options{
-		"prevExist": true,
-	}
-
-	return c.put(key, value, ttl, ops)
-}
-
-func (c *Client) RawCreate(key string, value string, ttl uint64) (*RawResponse, error) {
-	ops := Options{
-		"prevExist": false,
-	}
-
-	return c.put(key, value, ttl, ops)
-}
-
-func (c *Client) RawCreateInOrder(dir string, value string, ttl uint64) (*RawResponse, error) {
-	return c.post(dir, value, ttl)
-}

+ 0 - 241
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/set_update_create_test.go

@@ -1,241 +0,0 @@
-package etcd
-
-import (
-	"testing"
-)
-
-func TestSet(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-	}()
-
-	resp, err := c.Set("foo", "bar", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if resp.Node.Key != "/foo" || resp.Node.Value != "bar" || resp.Node.TTL != 5 {
-		t.Fatalf("Set 1 failed: %#v", resp)
-	}
-	if resp.PrevNode != nil {
-		t.Fatalf("Set 1 PrevNode failed: %#v", resp)
-	}
-
-	resp, err = c.Set("foo", "bar2", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/foo" && resp.Node.Value == "bar2" && resp.Node.TTL == 5) {
-		t.Fatalf("Set 2 failed: %#v", resp)
-	}
-	if resp.PrevNode.Key != "/foo" || resp.PrevNode.Value != "bar" || resp.Node.TTL != 5 {
-		t.Fatalf("Set 2 PrevNode failed: %#v", resp)
-	}
-}
-
-func TestUpdate(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-		c.Delete("nonexistent", true)
-	}()
-
-	resp, err := c.Set("foo", "bar", 5)
-
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// This should succeed.
-	resp, err = c.Update("foo", "wakawaka", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "update" && resp.Node.Key == "/foo" && resp.Node.TTL == 5) {
-		t.Fatalf("Update 1 failed: %#v", resp)
-	}
-	if !(resp.PrevNode.Key == "/foo" && resp.PrevNode.Value == "bar" && resp.Node.TTL == 5) {
-		t.Fatalf("Update 1 prevValue failed: %#v", resp)
-	}
-
-	// This should fail because the key does not exist.
-	resp, err = c.Update("nonexistent", "whatever", 5)
-	if err == nil {
-		t.Fatalf("The key %v did not exist, so the update should have failed."+
-			"The response was: %#v", resp.Node.Key, resp)
-	}
-}
-
-func TestCreate(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("newKey", true)
-	}()
-
-	newKey := "/newKey"
-	newValue := "/newValue"
-
-	// This should succeed
-	resp, err := c.Create(newKey, newValue, 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "create" && resp.Node.Key == newKey &&
-		resp.Node.Value == newValue && resp.Node.TTL == 5) {
-		t.Fatalf("Create 1 failed: %#v", resp)
-	}
-	if resp.PrevNode != nil {
-		t.Fatalf("Create 1 PrevNode failed: %#v", resp)
-	}
-
-	// This should fail, because the key is already there
-	resp, err = c.Create(newKey, newValue, 5)
-	if err == nil {
-		t.Fatalf("The key %v did exist, so the creation should have failed."+
-			"The response was: %#v", resp.Node.Key, resp)
-	}
-}
-
-func TestCreateInOrder(t *testing.T) {
-	c := NewClient(nil)
-	dir := "/queue"
-	defer func() {
-		c.DeleteDir(dir)
-	}()
-
-	var firstKey, secondKey string
-
-	resp, err := c.CreateInOrder(dir, "1", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "create" && resp.Node.Value == "1" && resp.Node.TTL == 5) {
-		t.Fatalf("Create 1 failed: %#v", resp)
-	}
-
-	firstKey = resp.Node.Key
-
-	resp, err = c.CreateInOrder(dir, "2", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "create" && resp.Node.Value == "2" && resp.Node.TTL == 5) {
-		t.Fatalf("Create 2 failed: %#v", resp)
-	}
-
-	secondKey = resp.Node.Key
-
-	if firstKey >= secondKey {
-		t.Fatalf("Expected first key to be greater than second key, but %s is not greater than %s",
-			firstKey, secondKey)
-	}
-}
-
-func TestSetDir(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("foo", true)
-		c.Delete("fooDir", true)
-	}()
-
-	resp, err := c.CreateDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/fooDir" && resp.Node.Value == "" && resp.Node.TTL == 5) {
-		t.Fatalf("SetDir 1 failed: %#v", resp)
-	}
-	if resp.PrevNode != nil {
-		t.Fatalf("SetDir 1 PrevNode failed: %#v", resp)
-	}
-
-	// This should fail because /fooDir already points to a directory
-	resp, err = c.CreateDir("/fooDir", 5)
-	if err == nil {
-		t.Fatalf("fooDir already points to a directory, so SetDir should have failed."+
-			"The response was: %#v", resp)
-	}
-
-	_, err = c.Set("foo", "bar", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// This should succeed
-	// It should replace the key
-	resp, err = c.SetDir("foo", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/foo" && resp.Node.Value == "" && resp.Node.TTL == 5) {
-		t.Fatalf("SetDir 2 failed: %#v", resp)
-	}
-	if !(resp.PrevNode.Key == "/foo" && resp.PrevNode.Value == "bar" && resp.PrevNode.TTL == 5) {
-		t.Fatalf("SetDir 2 failed: %#v", resp)
-	}
-}
-
-func TestUpdateDir(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("fooDir", true)
-	}()
-
-	resp, err := c.CreateDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// This should succeed.
-	resp, err = c.UpdateDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "update" && resp.Node.Key == "/fooDir" &&
-		resp.Node.Value == "" && resp.Node.TTL == 5) {
-		t.Fatalf("UpdateDir 1 failed: %#v", resp)
-	}
-	if !(resp.PrevNode.Key == "/fooDir" && resp.PrevNode.Dir == true && resp.PrevNode.TTL == 5) {
-		t.Fatalf("UpdateDir 1 PrevNode failed: %#v", resp)
-	}
-
-	// This should fail because the key does not exist.
-	resp, err = c.UpdateDir("nonexistentDir", 5)
-	if err == nil {
-		t.Fatalf("The key %v did not exist, so the update should have failed."+
-			"The response was: %#v", resp.Node.Key, resp)
-	}
-}
-
-func TestCreateDir(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("fooDir", true)
-	}()
-
-	// This should succeed
-	resp, err := c.CreateDir("fooDir", 5)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if !(resp.Action == "create" && resp.Node.Key == "/fooDir" &&
-		resp.Node.Value == "" && resp.Node.TTL == 5) {
-		t.Fatalf("CreateDir 1 failed: %#v", resp)
-	}
-	if resp.PrevNode != nil {
-		t.Fatalf("CreateDir 1 PrevNode failed: %#v", resp)
-	}
-
-	// This should fail, because the key is already there
-	resp, err = c.CreateDir("fooDir", 5)
-	if err == nil {
-		t.Fatalf("The key %v did exist, so the creation should have failed."+
-			"The response was: %#v", resp.Node.Key, resp)
-	}
-}

+ 0 - 6
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/version.go

@@ -1,6 +0,0 @@
-package etcd
-
-const (
-	version        = "v2"
-	packageVersion = "v2.0.0+git"
-)

+ 0 - 103
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/watch.go

@@ -1,103 +0,0 @@
-package etcd
-
-import (
-	"errors"
-)
-
-// Errors introduced by the Watch command.
-var (
-	ErrWatchStoppedByUser = errors.New("Watch stopped by the user via stop channel")
-)
-
-// If recursive is set to true the watch returns the first change under the given
-// prefix since the given index.
-//
-// If recursive is set to false the watch returns the first change to the given key
-// since the given index.
-//
-// To watch for the latest change, set waitIndex = 0.
-//
-// If a receiver channel is given, it will be a long-term watch. Watch will block at the
-//channel. After someone receives the channel, it will go on to watch that
-// prefix.  If a stop channel is given, the client can close long-term watch using
-// the stop channel.
-func (c *Client) Watch(prefix string, waitIndex uint64, recursive bool,
-	receiver chan *Response, stop chan bool) (*Response, error) {
-	logger.Debugf("watch %s [%s]", prefix, c.cluster.Leader)
-	if receiver == nil {
-		raw, err := c.watchOnce(prefix, waitIndex, recursive, stop)
-
-		if err != nil {
-			return nil, err
-		}
-
-		return raw.Unmarshal()
-	}
-	defer close(receiver)
-
-	for {
-		raw, err := c.watchOnce(prefix, waitIndex, recursive, stop)
-
-		if err != nil {
-			return nil, err
-		}
-
-		resp, err := raw.Unmarshal()
-
-		if err != nil {
-			return nil, err
-		}
-
-		waitIndex = resp.Node.ModifiedIndex + 1
-		receiver <- resp
-	}
-}
-
-func (c *Client) RawWatch(prefix string, waitIndex uint64, recursive bool,
-	receiver chan *RawResponse, stop chan bool) (*RawResponse, error) {
-
-	logger.Debugf("rawWatch %s [%s]", prefix, c.cluster.Leader)
-	if receiver == nil {
-		return c.watchOnce(prefix, waitIndex, recursive, stop)
-	}
-
-	for {
-		raw, err := c.watchOnce(prefix, waitIndex, recursive, stop)
-
-		if err != nil {
-			return nil, err
-		}
-
-		resp, err := raw.Unmarshal()
-
-		if err != nil {
-			return nil, err
-		}
-
-		waitIndex = resp.Node.ModifiedIndex + 1
-		receiver <- raw
-	}
-}
-
-// helper func
-// return when there is change under the given prefix
-func (c *Client) watchOnce(key string, waitIndex uint64, recursive bool, stop chan bool) (*RawResponse, error) {
-
-	options := Options{
-		"wait": true,
-	}
-	if waitIndex > 0 {
-		options["waitIndex"] = waitIndex
-	}
-	if recursive {
-		options["recursive"] = true
-	}
-
-	resp, err := c.getCancelable(key, options, stop)
-
-	if err == ErrRequestCancelled {
-		return nil, ErrWatchStoppedByUser
-	}
-
-	return resp, err
-}

+ 0 - 119
libnetwork/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd/watch_test.go

@@ -1,119 +0,0 @@
-package etcd
-
-import (
-	"fmt"
-	"runtime"
-	"testing"
-	"time"
-)
-
-func TestWatch(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("watch_foo", true)
-	}()
-
-	go setHelper("watch_foo", "bar", c)
-
-	resp, err := c.Watch("watch_foo", 0, false, nil, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/watch_foo" && resp.Node.Value == "bar") {
-		t.Fatalf("Watch 1 failed: %#v", resp)
-	}
-
-	go setHelper("watch_foo", "bar", c)
-
-	resp, err = c.Watch("watch_foo", resp.Node.ModifiedIndex+1, false, nil, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/watch_foo" && resp.Node.Value == "bar") {
-		t.Fatalf("Watch 2 failed: %#v", resp)
-	}
-
-	routineNum := runtime.NumGoroutine()
-
-	ch := make(chan *Response, 10)
-	stop := make(chan bool, 1)
-
-	go setLoop("watch_foo", "bar", c)
-
-	go receiver(ch, stop)
-
-	_, err = c.Watch("watch_foo", 0, false, ch, stop)
-	if err != ErrWatchStoppedByUser {
-		t.Fatalf("Watch returned a non-user stop error")
-	}
-
-	if newRoutineNum := runtime.NumGoroutine(); newRoutineNum != routineNum {
-		t.Fatalf("Routine numbers differ after watch stop: %v, %v", routineNum, newRoutineNum)
-	}
-}
-
-func TestWatchAll(t *testing.T) {
-	c := NewClient(nil)
-	defer func() {
-		c.Delete("watch_foo", true)
-	}()
-
-	go setHelper("watch_foo/foo", "bar", c)
-
-	resp, err := c.Watch("watch_foo", 0, true, nil, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/watch_foo/foo" && resp.Node.Value == "bar") {
-		t.Fatalf("WatchAll 1 failed: %#v", resp)
-	}
-
-	go setHelper("watch_foo/foo", "bar", c)
-
-	resp, err = c.Watch("watch_foo", resp.Node.ModifiedIndex+1, true, nil, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if !(resp.Node.Key == "/watch_foo/foo" && resp.Node.Value == "bar") {
-		t.Fatalf("WatchAll 2 failed: %#v", resp)
-	}
-
-	ch := make(chan *Response, 10)
-	stop := make(chan bool, 1)
-
-	routineNum := runtime.NumGoroutine()
-
-	go setLoop("watch_foo/foo", "bar", c)
-
-	go receiver(ch, stop)
-
-	_, err = c.Watch("watch_foo", 0, true, ch, stop)
-	if err != ErrWatchStoppedByUser {
-		t.Fatalf("Watch returned a non-user stop error")
-	}
-
-	if newRoutineNum := runtime.NumGoroutine(); newRoutineNum != routineNum {
-		t.Fatalf("Routine numbers differ after watch stop: %v, %v", routineNum, newRoutineNum)
-	}
-}
-
-func setHelper(key, value string, c *Client) {
-	time.Sleep(time.Second)
-	c.Set(key, value, 100)
-}
-
-func setLoop(key, value string, c *Client) {
-	time.Sleep(time.Second)
-	for i := 0; i < 10; i++ {
-		newValue := fmt.Sprintf("%s_%v", value, i)
-		c.Set(key, newValue, 100)
-		time.Sleep(time.Second / 10)
-	}
-}
-
-func receiver(c chan *Response, stop chan bool) {
-	for i := 0; i < 10; i++ {
-		<-c
-	}
-	stop <- true
-}

+ 1 - 1
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/.travis.yml

@@ -19,7 +19,7 @@ before_install:
 
 
 before_script:
 before_script:
   - script/travis_consul.sh 0.5.2 
   - script/travis_consul.sh 0.5.2 
-  - script/travis_etcd.sh 2.0.11
+  - script/travis_etcd.sh 2.2.0
   - script/travis_zk.sh 3.4.6
   - script/travis_zk.sh 3.4.6
 
 
 script:
 script:

+ 50 - 71
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/README.md

@@ -6,90 +6,37 @@
 
 
 `libkv` provides a `Go` native library to store metadata.
 `libkv` provides a `Go` native library to store metadata.
 
 
-The goal of `libkv` is to abstract common store operations for multiple Key/Value backends and offer the same experience no matter which one of the backend you want to use.
+The goal of `libkv` is to abstract common store operations for multiple distributed and/or local Key/Value store backends.
 
 
 For example, you can use it to store your metadata or for service discovery to register machines and endpoints inside your cluster.
 For example, you can use it to store your metadata or for service discovery to register machines and endpoints inside your cluster.
 
 
 You can also easily implement a generic *Leader Election* on top of it (see the [swarm/leadership](https://github.com/docker/swarm/tree/master/leadership) package).
 You can also easily implement a generic *Leader Election* on top of it (see the [swarm/leadership](https://github.com/docker/swarm/tree/master/leadership) package).
 
 
-As of now, `libkv` offers support for `Consul`, `Etcd`, `Zookeeper` and `BoltDB`.
+As of now, `libkv` offers support for `Consul`, `Etcd`, `Zookeeper` (**Distributed** store) and `BoltDB` (**Local** store).
 
 
-## Example of usage
+## Usage
 
 
-### Create a new store and use Put/Get
+`libkv` is meant to be used as an abstraction layer over existing distributed Key/Value stores. It is especially useful if you plan to support `consul`, `etcd` and `zookeeper` using the same codebase.
 
 
-```go
-package main
-
-import (
-	"fmt"
-	"time"
+It is ideal if you plan for something written in Go that should support:
 
 
-	"github.com/docker/libkv"
-	"github.com/docker/libkv/store"
-	"github.com/docker/libkv/store/consul"
-	log "github.com/Sirupsen/logrus"
-)
-
-func init() {
-	// Register consul store to libkv
-	consul.Register()
-}
-
-func main() {
-	client := "localhost:8500"
-
-	// Initialize a new store with consul
-	kv, err := libkv.NewStore(
-		store.CONSUL, // or "consul"
-		[]string{client},
-		&store.Config{
-			ConnectionTimeout: 10*time.Second,
-		},
-	)
-	if err != nil {
-		log.Fatal("Cannot create store consul")
-	}
-
-	key := "foo"
-	err = kv.Put(key, []byte("bar"), nil)
-	if err != nil {
-		log.Error("Error trying to put value at key `", key, "`")
-	}
-
-	pair, err := kv.Get(key)
-	if err != nil {
-		log.Error("Error trying accessing value at key `", key, "`")
-	}
-
-	log.Info("value: ", string(pair.Value))
-}
-```
+- A simple metadata storage, distributed or local
+- A lightweight discovery service for your nodes
+- A distributed lock mechanism
 
 
-You can find other usage examples for `libkv` under the `docker/swarm` or `docker/libnetwork` repositories.
+You can find examples of usage for `libkv` under in `docs/examples.go`. Optionally you can also take a look at the `docker/swarm` or `docker/libnetwork` repositories which are using `docker/libkv` for all the use cases listed above.
 
 
 ## Supported versions
 ## Supported versions
 
 
 `libkv` supports:
 `libkv` supports:
-- Consul version >= `0.5.1` because it uses Sessions with `Delete` behavior for the use of `TTLs` (mimics zookeeper's Ephemeral node support), If you don't plan to use `TTLs`: you can use Consul version `0.4.0+`.
-- Etcd version >= `2.0` because it uses the `2.0.0` branch of the `coreos/go-etcd` client, this might change in the future as the support for `APIv3` comes along.
-- Zookeeper version >= `3.4.5`. Although this might work with previous version but this remains untested as of now.
+- Consul versions >= `0.5.1` because it uses Sessions with `Delete` behavior for the use of `TTLs` (mimics zookeeper's Ephemeral node support), If you don't plan to use `TTLs`: you can use Consul version `0.4.0+`.
+- Etcd versions >= `2.0` because it uses the new `coreos/etcd/client`, this might change in the future as the support for `APIv3` comes along and adds mor capabilities.
+- Zookeeper versions >= `3.4.5`. Although this might work with previous version but this remains untested as of now.
+- Boltdb, which shouldn't be subject to any version dependencies.
 
 
-## TLS
-
-The etcd backend supports etcd servers that require TLS Client Authentication. Zookeeper and Consul support are planned. This feature is somewhat experimental and the store.ClientTLSConfig struct may change to accommodate the additional backends.
-
-## Warning
-
-There are a few consistency issues with *etcd*, on the notion of *directory* and *key*. If you want to use the three KV backends in an interchangeable way, you should only put data on leaves (see [Issue 20](https://github.com/docker/libkv/issues/20) for more details). This will be fixed when *etcd* API v3 will be made available (API v3 drops the *directory/key* distinction). An official release for *libkv* with a tag is likely to come after this issue being marked as **solved**.
-
-Other than that, you should expect the same experience for basic operations like `Get`/`Put`, etc.
-
-Calls like `WatchTree` may return different events (or number of events) depending on the backend (for now, `Etcd` and `Consul` will likely return more events than `Zookeeper` that you should triage properly). Although you should be able to use it successfully to watch on events in an interchangeable way (see the **swarm/leadership** or **swarm/discovery** packages in **docker/swarm**).
+## Interface
 
 
-## Create a new storage backend
-
-A new **storage backend** should include those calls:
+A **storage backend** in `libkv` should implement (fully or partially) this interface:
 
 
 ```go
 ```go
 type Store interface {
 type Store interface {
@@ -108,14 +55,46 @@ type Store interface {
 }
 }
 ```
 ```
 
 
-You can get inspiration from existing backends to create a new one. This interface could be subject to changes to improve the experience of using the library and contributing to a new backend.
+## Compatibility matrix
+
+Backend drivers in `libkv` are generally divided between **local drivers** and **distributed drivers**. Distributed backends offer enhanced capabilities like `Watches` and/or distributed `Locks`.
+
+Local drivers are usually used in complement to the distributed drivers to store informations that only needs to be available locally.
+
+| Calls                 |   Consul   |  Etcd  |  Zookeeper  |  BoltDB  |
+|-----------------------|:----------:|:------:|:-----------:|:--------:|
+| Put                   |     X      |   X    |      X      |    X     |
+| Get                   |     X      |   X    |      X      |    X     |
+| Delete                |     X      |   X    |      X      |    X     |
+| Exists                |     X      |   X    |      X      |    X     |
+| Watch                 |     X      |   X    |      X      |          |
+| WatchTree             |     X      |   X    |      X      |          |
+| NewLock (Lock/Unlock) |     X      |   X    |      X      |          |
+| List                  |     X      |   X    |      X      |    X     |
+| DeleteTree            |     X      |   X    |      X      |    X     |
+| AtomicPut             |     X      |   X    |      X      |    X     |
+| Close                 |     X      |   X    |      X      |    X     |
+
+## Limitations
+
+Distributed Key/Value stores often have different concepts for managing and formatting keys and their associated values. Even though `libkv` tries to abstract those stores aiming for some consistency, in some cases it can't be applied easily.
+
+Please refer to the `docs/compatibility.md` to see what are the special cases for cross-backend compatibility.
+
+Other than those special cases, you should expect the same experience for basic operations like `Get`/`Put`, etc.
+
+Calls like `WatchTree` may return different events (or number of events) depending on the backend (for now, `Etcd` and `Consul` will likely return more events than `Zookeeper` that you should triage properly). Although you should be able to use it successfully to watch on events in an interchangeable way (see the **swarm/leadership** or **swarm/discovery** packages in **docker/swarm**).
+
+## TLS
+
+Only `Consul` and `etcd` have support for TLS and you should build and provide your own `config.TLS` object to feed the client. Support is planned for `zookeeper`.
 
 
 ##Roadmap
 ##Roadmap
 
 
 - Make the API nicer to use (using `options`)
 - Make the API nicer to use (using `options`)
 - Provide more options (`consistency` for example)
 - Provide more options (`consistency` for example)
 - Improve performance (remove extras `Get`/`List` operations)
 - Improve performance (remove extras `Get`/`List` operations)
-- Add more exhaustive tests
+- Better key formatting
 - New backends?
 - New backends?
 
 
 ##Contributing
 ##Contributing
@@ -124,4 +103,4 @@ Want to hack on libkv? [Docker's contributions guidelines](https://github.com/do
 
 
 ##Copyright and license
 ##Copyright and license
 
 
-Copyright © 2014-2015 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. Documentation is licensed to end users under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.
+Copyright © 2014-2015 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.

+ 82 - 0
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/docs/compatibility.md

@@ -0,0 +1,82 @@
+#Cross-Backend Compatibility
+
+The value of `libkv` is not to duplicate the code for programs that should support multiple distributed K/V stores like the classic `Consul`/`etcd`/`zookeeper` trio.
+
+This document provides with general guidelines for users willing to support those backends with the same code using `libkv`.
+
+Please note that most of those workarounds are going to disappear in the future with `etcd` APIv3.
+
+##Etcd directory/key distinction
+
+`etcd` with APIv2 makes the distinction between keys and directories. The result with `libkv` is that when using the etcd driver:
+
+- You cannot store values on directories
+- You cannot invoke `WatchTree` (watching on child values), on a regular key
+
+This is fundamentaly different than `Consul` and `zookeeper` which are more permissive and allow the same set of operations on keys and directories (called a Node for zookeeper).
+
+Apiv3 is in the work for `etcd`, which removes this key/directory distinction, but until then you should follow these workarounds to make your `libkv` code work across backends.
+
+###Put
+
+`etcd` cannot put values on directories, so this puts a major restriction compared to `Consul` and `zookeeper`.
+
+If you want to support all those three backends, you should make sure to only put data on **leaves**.
+
+For example:
+
+```go
+_ := kv.Put("path/to/key/bis", []byte("foo"), nil)
+_ := kv.Put("path/to/key", []byte("bar"), nil)
+```
+
+Will work on `Consul` and `zookeeper` but fail for `etcd`. This is because the first `Put` in the case of `etcd` will recursively create the directory hierarchy and `path/to/key` is now considered as a directory. Thus, values should always be stored on leaves if the support for the three backends is planned.
+
+###WatchTree
+
+When initializing the `WatchTree`, the natural way to do so is through the following code:
+
+```go
+key := "path/to/key"
+if !kv.Exists(key) {
+    err := kv.Put(key, []byte("data"), nil)
+}
+events, err := kv.WatchTree(key, nil)
+```
+
+The code above will not work across backends and etcd will fail on the `WatchTree` call. What happens exactly:
+
+- `Consul` will create a regular `key` because it has no distinction between directories and keys. This is not an issue as we can invoke `WatchTree` on regular keys.
+- `zookeeper` is going to create a `node` that can either be a directory or a key during the lifetime of a program but it does not matter as a directory can hold values and be watchable like a regular key.
+- `etcd` is going to create a regular `key`. We cannot invoke `WatchTree` on regular keys using etcd.
+
+To be cross-compatible between those three backends for `WatchTree`, we need to enforce a parameter that is only interpreted with `etcd` and which tells the client to create a `directory` instead of a key.
+
+```go
+key := "path/to/key"
+if !kv.Exists(key) {
+    // We enforce IsDir = true to make sure etcd creates a directory
+    err := kv.Put(key, []byte("data"), &store.WriteOptions{IsDir:true})
+}
+events, err := kv.WatchTree(key, nil)
+```
+
+The code above will work for the three backends but make sure to not try to store any value at that path as the call to `Put` will fail for `etcd` (you can only put at `path/to/key/foo`, `path/to/key/bar` for example).
+
+##Etcd distributed locking
+
+There is `Lock` mechanisms baked in the `coreos/etcd/client` for now. Instead, `libkv` has its own implementation of a `Lock` on top of `etcd`.
+
+The general workflow for the `Lock` is as follows:
+
+- Call Lock concurrently on a `key` between threads/programs
+- Only one will create that key, others are going to fail because the key has already been created
+- The thread locking the key can get the right index to set the value of the key using Compare And Swap and effectively Lock and hold the key
+- Other threads are given a wrong index to fail the Compare and Swap and block until the key has been released by the thread holding the Lock
+- Lock seekers are setting up a Watch listening on that key and events happening on the key
+- When the thread/program stops holding the lock, it deletes the key triggering a `delete` event that will notify all the other threads. In case the program crashes, the key has a TTL attached that will send an `expire` event when this TTL expires.
+- Once everyone is notified, back to the first step. First come, first served with the Lock.
+
+The whole Lock process is highly dependent on the `delete`/`expire` events of `etcd`. So don't expect the key to be still there once the Lock is released.
+
+For example if the whole logic is to `Lock` a key and expect the value to still be there after it has been unlocked, it is not going to be cross-backend compatible with `Consul` and `zookeeper`. On the other end the `etcd` Lock can still be used to do Leader Election for example and still be cross-compatible with other backends.

+ 157 - 0
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/docs/examples.md

@@ -0,0 +1,157 @@
+#Examples
+
+This document contains useful example of usage for `libkv`. It might not be complete but provides with general informations on how to use the client.
+
+##Create a store and use Put/Get/Delete
+
+```go
+package main
+
+import (
+    "fmt"
+    "time"
+    "log"
+
+    "github.com/docker/libkv"
+    "github.com/docker/libkv/store"
+    "github.com/docker/libkv/store/consul"
+)
+
+func init() {
+    // Register consul store to libkv
+    consul.Register()
+
+    // We can register as many backends that are supported by libkv
+    etcd.Register()
+    zookeeper.Register()
+    boltdb.Register()
+}
+
+func main() {
+    client := "localhost:8500"
+
+    // Initialize a new store with consul
+    kv, err := libkv.NewStore(
+        store.CONSUL, // or "consul"
+        []string{client},
+        &store.Config{
+            ConnectionTimeout: 10*time.Second,
+        },
+    )
+    if err != nil {
+        log.Fatal("Cannot create store consul")
+    }
+
+    key := "foo"
+    err = kv.Put(key, []byte("bar"), nil)
+    if err != nil {
+        fmt.Errorf("Error trying to put value at key: %v", key)
+    }
+
+    pair, err := kv.Get(key)
+    if err != nil {
+        fmt.Errorf("Error trying accessing value at key: %v", key)
+    }
+
+    err = kv.Delete(key)
+    if err != nil {
+        fmt.Errorf("Error trying to delete key %v", key)
+    }
+
+    log.Info("value: ", string(pair.Value))
+}
+```
+
+##List keys
+
+```go
+// List will list all the keys under `key` if it contains a set of child keys/values
+entries, err := kv.List(key)
+for _, pair := range entries {
+    fmt.Printf("key=%v - value=%v", pair.Key, string(pair.Value))
+}
+
+```
+
+##Watching for events on a single key (Watch)
+
+You can use watches to watch modifications on a key. First you need to check if the key exists. If this is not the case, we need to create it using the `Put` function.
+
+```go
+// Checking on the key before watching
+if !kv.Exists(key) {
+    err := kv.Put(key, []byte("bar"), nil)
+    if err != nil {
+        fmt.Errorf("Something went wrong when initializing key %v", key)
+    }
+}
+
+stopCh := make(<-chan struct{})
+events, err := kv.Watch(key, stopCh)
+
+select {
+    case pair := <-events:
+        // Do something with events
+        fmt.Printf("value changed on key %v: new value=%v", key, pair.Value)
+}
+
+```
+
+##Watching for events happening on child keys (WatchTree)
+
+You can use watches to watch modifications on a key. First you need to check if the key exists. If this is not the case, we need to create it using the `Put` function. There is a special step here though if you want your code to work across backends. Because `etcd` is a special case and it makes the distinction between directories and keys, we need to make sure that the created key is considered as a directory by enforcing `IsDir` at `true`.
+
+```go
+// Checking on the key before watching
+if !kv.Exists(key) {
+    // Don't forget IsDir:true if the code is used cross-backend
+    err := kv.Put(key, []byte("bar"), &store.WriteOptions{IsDir:true})
+    if err != nil {
+        fmt.Errorf("Something went wrong when initializing key %v", key)
+    }
+}
+
+stopCh := make(<-chan struct{})
+events, err := kv.WatchTree(key, stopCh)
+
+select {
+    case pairs := <-events:
+        // Do something with events
+        for _, pair := range pairs {
+            fmt.Printf("value changed on key %v: new value=%v", key, pair.Value)
+        }
+}
+
+```
+
+## Distributed Locking, using Lock/Unlock
+
+```go
+key := "lockKey"
+value := []byte("bar")
+
+// Initialize a distributed lock. TTL is optional, it is here to make sure that
+// the lock is released after the program that is holding the lock ends or crashes
+lock, err := kv.NewLock(key, &store.LockOptions{Value: value, TTL: 2 * time.Second})
+if err != nil {
+    fmt.Errorf("something went wrong when trying to initialize the Lock")
+}
+
+// Try to lock the key, the call to Lock() is blocking
+_, err := lock.Lock(nil)
+if err != nil {
+    fmt.Errorf("something went wrong when trying to lock key %v", key)
+}
+
+// Get should work because we are holding the key
+pair, err := kv.Get(key)
+if err != nil {
+    fmt.Errorf("key %v has value %v", key, pair.Value)
+}
+
+// Unlock the key
+err = lock.Unlock()
+if err != nil {
+    fmt.Errorf("something went wrong when trying to unlock key %v", key)
+}
+```

+ 1 - 62
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/libkv.go

@@ -1,64 +1,3 @@
-// Package libkv provides a Go native library to store metadata.
-//
-// The goal of libkv is to abstract common store operations for multiple
-// Key/Value backends and offer the same experience no matter which one of the
-// backend you want to use.
-//
-// For example, you can use it to store your metadata or for service discovery to
-// register machines and endpoints inside your cluster.
-//
-// As of now, `libkv` offers support for `Consul`, `Etcd` and `Zookeeper`.
-//
-// ## Example of usage
-//
-// ### Create a new store and use Put/Get
-//
-//
-//     package main
-//
-//     import (
-//     	"fmt"
-//     	"time"
-//
-//     	"github.com/docker/libkv"
-//     	"github.com/docker/libkv/store"
-//     	log "github.com/Sirupsen/logrus"
-//     )
-//
-//     func main() {
-//     	client := "localhost:8500"
-//
-//     	// Initialize a new store with consul
-//     	kv, err := libkv.NewStore(
-//     		store.CONSUL, // or "consul"
-//     		[]string{client},
-//     		&store.Config{
-//     			ConnectionTimeout: 10*time.Second,
-//     		},
-//     	)
-//     	if err != nil {
-//     		log.Fatal("Cannot create store consul")
-//     	}
-//
-//     	key := "foo"
-//     	err = kv.Put(key, []byte("bar"), nil)
-//     	if err != nil {
-//     		log.Error("Error trying to put value at key `", key, "`")
-//     	}
-//
-//     	pair, err := kv.Get(key)
-//     	if err != nil {
-//     		log.Error("Error trying accessing value at key `", key, "`")
-//     	}
-//
-//     	log.Info("value: ", string(pair.Value))
-//     }
-//
-// ##Copyright and license
-//
-// Code and documentation copyright 2015 Docker, inc. Code released under the
-// Apache 2.0 license. Docs released under Creative commons.
-//
 package libkv
 package libkv
 
 
 import (
 import (
@@ -92,7 +31,7 @@ func NewStore(backend store.Backend, addrs []string, options *store.Config) (sto
 		return init(addrs, options)
 		return init(addrs, options)
 	}
 	}
 
 
-	return nil, fmt.Errorf("%s %s", store.ErrNotSupported.Error(), supportedBackend)
+	return nil, fmt.Errorf("%s %s", store.ErrBackendNotSupported.Error(), supportedBackend)
 }
 }
 
 
 // AddStore adds a new store backend to libkv
 // AddStore adds a new store backend to libkv

+ 1 - 1
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/script/travis_etcd.sh

@@ -3,7 +3,7 @@
 if [  $# -gt 0 ] ; then
 if [  $# -gt 0 ] ; then
     ETCD_VERSION="$1"
     ETCD_VERSION="$1"
 else
 else
-    ETCD_VERSION="2.0.11"
+    ETCD_VERSION="2.2.0"
 fi
 fi
 
 
 curl -L https://github.com/coreos/etcd/releases/download/v$ETCD_VERSION/etcd-v$ETCD_VERSION-linux-amd64.tar.gz -o etcd-v$ETCD_VERSION-linux-amd64.tar.gz
 curl -L https://github.com/coreos/etcd/releases/download/v$ETCD_VERSION/etcd-v$ETCD_VERSION-linux-amd64.tar.gz -o etcd-v$ETCD_VERSION-linux-amd64.tar.gz

+ 3 - 5
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/boltdb/boltdb.go

@@ -23,8 +23,6 @@ var (
 	ErrBoltBucketNotFound = errors.New("boltdb bucket doesn't exist")
 	ErrBoltBucketNotFound = errors.New("boltdb bucket doesn't exist")
 	// ErrBoltBucketOptionMissing is thrown when boltBcuket config option is missing
 	// ErrBoltBucketOptionMissing is thrown when boltBcuket config option is missing
 	ErrBoltBucketOptionMissing = errors.New("boltBucket config option missing")
 	ErrBoltBucketOptionMissing = errors.New("boltBucket config option missing")
-	// ErrBoltAPIUnsupported is thrown when an APIs unsupported by BoltDB backend is called
-	ErrBoltAPIUnsupported = errors.New("API not supported by BoltDB backend")
 )
 )
 
 
 const (
 const (
@@ -456,15 +454,15 @@ func (b *BoltDB) DeleteTree(keyPrefix string) error {
 
 
 // NewLock has to implemented at the library level since its not supported by BoltDB
 // NewLock has to implemented at the library level since its not supported by BoltDB
 func (b *BoltDB) NewLock(key string, options *store.LockOptions) (store.Locker, error) {
 func (b *BoltDB) NewLock(key string, options *store.LockOptions) (store.Locker, error) {
-	return nil, ErrBoltAPIUnsupported
+	return nil, store.ErrCallNotSupported
 }
 }
 
 
 // Watch has to implemented at the library level since its not supported by BoltDB
 // Watch has to implemented at the library level since its not supported by BoltDB
 func (b *BoltDB) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {
 func (b *BoltDB) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {
-	return nil, ErrBoltAPIUnsupported
+	return nil, store.ErrCallNotSupported
 }
 }
 
 
 // WatchTree has to implemented at the library level since its not supported by BoltDB
 // WatchTree has to implemented at the library level since its not supported by BoltDB
 func (b *BoltDB) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {
 func (b *BoltDB) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {
-	return nil, ErrBoltAPIUnsupported
+	return nil, store.ErrCallNotSupported
 }
 }

+ 20 - 9
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/consul/consul.go

@@ -18,12 +18,20 @@ const (
 	// time to check if the watched key has changed. This
 	// time to check if the watched key has changed. This
 	// affects the minimum time it takes to cancel a watch.
 	// affects the minimum time it takes to cancel a watch.
 	DefaultWatchWaitTime = 15 * time.Second
 	DefaultWatchWaitTime = 15 * time.Second
+
+	// RenewSessionRetryMax is the number of time we should try
+	// to renew the session before giving up and throwing an error
+	RenewSessionRetryMax = 5
 )
 )
 
 
 var (
 var (
 	// ErrMultipleEndpointsUnsupported is thrown when there are
 	// ErrMultipleEndpointsUnsupported is thrown when there are
 	// multiple endpoints specified for Consul
 	// multiple endpoints specified for Consul
 	ErrMultipleEndpointsUnsupported = errors.New("consul does not support multiple endpoints")
 	ErrMultipleEndpointsUnsupported = errors.New("consul does not support multiple endpoints")
+
+	// ErrSessionRenew is thrown when the session can't be
+	// renewed because the Consul version does not support sessions
+	ErrSessionRenew = errors.New("cannot set or renew session for ttl, unable to operate on sessions")
 )
 )
 
 
 // Consul is the receiver type for the
 // Consul is the receiver type for the
@@ -99,7 +107,7 @@ func (s *Consul) normalize(key string) string {
 	return strings.TrimPrefix(key, "/")
 	return strings.TrimPrefix(key, "/")
 }
 }
 
 
-func (s *Consul) refreshSession(pair *api.KVPair, ttl time.Duration) error {
+func (s *Consul) renewSession(pair *api.KVPair, ttl time.Duration) error {
 	// Check if there is any previous session with an active TTL
 	// Check if there is any previous session with an active TTL
 	session, err := s.getActiveSession(pair.Key)
 	session, err := s.getActiveSession(pair.Key)
 	if err != nil {
 	if err != nil {
@@ -134,10 +142,7 @@ func (s *Consul) refreshSession(pair *api.KVPair, ttl time.Duration) error {
 	}
 	}
 
 
 	_, _, err = s.client.Session().Renew(session, nil)
 	_, _, err = s.client.Session().Renew(session, nil)
-	if err != nil {
-		return s.refreshSession(pair, ttl)
-	}
-	return nil
+	return err
 }
 }
 
 
 // getActiveSession checks if the key already has
 // getActiveSession checks if the key already has
@@ -184,10 +189,16 @@ func (s *Consul) Put(key string, value []byte, opts *store.WriteOptions) error {
 	}
 	}
 
 
 	if opts != nil && opts.TTL > 0 {
 	if opts != nil && opts.TTL > 0 {
-		// Create or refresh the session
-		err := s.refreshSession(p, opts.TTL)
-		if err != nil {
-			return err
+		// Create or renew a session holding a TTL. Operations on sessions
+		// are not deterministic: creating or renewing a session can fail
+		for retry := 1; retry <= RenewSessionRetryMax; retry++ {
+			err := s.renewSession(p, opts.TTL)
+			if err == nil {
+				break
+			}
+			if retry == RenewSessionRetryMax {
+				return ErrSessionRenew
+			}
 		}
 		}
 	}
 	}
 
 

+ 210 - 179
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/etcd/etcd.go

@@ -3,12 +3,15 @@ package etcd
 import (
 import (
 	"crypto/tls"
 	"crypto/tls"
 	"errors"
 	"errors"
+	"log"
 	"net"
 	"net"
 	"net/http"
 	"net/http"
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
-	etcd "github.com/coreos/go-etcd/etcd"
+	"golang.org/x/net/context"
+
+	etcd "github.com/coreos/etcd/client"
 	"github.com/docker/libkv"
 	"github.com/docker/libkv"
 	"github.com/docker/libkv/store"
 	"github.com/docker/libkv/store"
 )
 )
@@ -23,21 +26,21 @@ var (
 // Etcd is the receiver type for the
 // Etcd is the receiver type for the
 // Store interface
 // Store interface
 type Etcd struct {
 type Etcd struct {
-	client *etcd.Client
+	client etcd.KeysAPI
 }
 }
 
 
 type etcdLock struct {
 type etcdLock struct {
-	client    *etcd.Client
+	client    etcd.KeysAPI
 	stopLock  chan struct{}
 	stopLock  chan struct{}
 	stopRenew chan struct{}
 	stopRenew chan struct{}
 	key       string
 	key       string
 	value     string
 	value     string
 	last      *etcd.Response
 	last      *etcd.Response
-	ttl       uint64
+	ttl       time.Duration
 }
 }
 
 
 const (
 const (
-	periodicSync      = 10 * time.Minute
+	periodicSync      = 5 * time.Minute
 	defaultLockTTL    = 20 * time.Second
 	defaultLockTTL    = 20 * time.Second
 	defaultUpdateTime = 5 * time.Second
 	defaultUpdateTime = 5 * time.Second
 )
 )
@@ -57,34 +60,36 @@ func New(addrs []string, options *store.Config) (store.Store, error) {
 		err     error
 		err     error
 	)
 	)
 
 
-	// Create the etcd client
-	if options != nil && options.ClientTLS != nil {
-		entries = store.CreateEndpoints(addrs, "https")
-		s.client, err = etcd.NewTLSClient(entries, options.ClientTLS.CertFile, options.ClientTLS.KeyFile, options.ClientTLS.CACertFile)
-		if err != nil {
-			return nil, err
-		}
-	} else {
-		entries = store.CreateEndpoints(addrs, "http")
-		s.client = etcd.NewClient(entries)
+	entries = store.CreateEndpoints(addrs, "http")
+	cfg := &etcd.Config{
+		Endpoints:               entries,
+		Transport:               etcd.DefaultTransport,
+		HeaderTimeoutPerRequest: 3 * time.Second,
 	}
 	}
 
 
 	// Set options
 	// Set options
 	if options != nil {
 	if options != nil {
-		// Plain TLS config overrides ClientTLS if specified
 		if options.TLS != nil {
 		if options.TLS != nil {
-			s.setTLS(options.TLS, addrs)
+			setTLS(cfg, options.TLS, addrs)
 		}
 		}
 		if options.ConnectionTimeout != 0 {
 		if options.ConnectionTimeout != 0 {
-			s.setTimeout(options.ConnectionTimeout)
+			setTimeout(cfg, options.ConnectionTimeout)
 		}
 		}
 	}
 	}
 
 
-	// Periodic SyncCluster
+	c, err := etcd.New(*cfg)
+	if err != nil {
+		log.Fatal(err)
+	}
+
+	s.client = etcd.NewKeysAPI(c)
+
+	// Periodic Cluster Sync
 	go func() {
 	go func() {
 		for {
 		for {
-			s.client.SyncCluster()
-			time.Sleep(periodicSync)
+			if err := c.AutoSync(context.Background(), periodicSync); err != nil {
+				return
+			}
 		}
 		}
 	}()
 	}()
 
 
@@ -92,9 +97,9 @@ func New(addrs []string, options *store.Config) (store.Store, error) {
 }
 }
 
 
 // SetTLS sets the tls configuration given a tls.Config scheme
 // SetTLS sets the tls configuration given a tls.Config scheme
-func (s *Etcd) setTLS(tls *tls.Config, addrs []string) {
+func setTLS(cfg *etcd.Config, tls *tls.Config, addrs []string) {
 	entries := store.CreateEndpoints(addrs, "https")
 	entries := store.CreateEndpoints(addrs, "https")
-	s.client.SetCluster(entries)
+	cfg.Endpoints = entries
 
 
 	// Set transport
 	// Set transport
 	t := http.Transport{
 	t := http.Transport{
@@ -105,36 +110,46 @@ func (s *Etcd) setTLS(tls *tls.Config, addrs []string) {
 		TLSHandshakeTimeout: 10 * time.Second,
 		TLSHandshakeTimeout: 10 * time.Second,
 		TLSClientConfig:     tls,
 		TLSClientConfig:     tls,
 	}
 	}
-	s.client.SetTransport(&t)
+
+	cfg.Transport = &t
 }
 }
 
 
 // setTimeout sets the timeout used for connecting to the store
 // setTimeout sets the timeout used for connecting to the store
-func (s *Etcd) setTimeout(time time.Duration) {
-	s.client.SetDialTimeout(time)
+func setTimeout(cfg *etcd.Config, time time.Duration) {
+	cfg.HeaderTimeoutPerRequest = time
+}
+
+// Normalize the key for usage in Etcd
+func (s *Etcd) normalize(key string) string {
+	key = store.Normalize(key)
+	return strings.TrimPrefix(key, "/")
 }
 }
 
 
-// createDirectory creates the entire path for a directory
-// that does not exist
-func (s *Etcd) createDirectory(path string) error {
-	if _, err := s.client.CreateDir(store.Normalize(path), 10); err != nil {
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
-			// Skip key already exists
-			if etcdError.ErrorCode != 105 {
-				return err
+// keyNotFound checks on the error returned by the KeysAPI
+// to verify if the key exists in the store or not
+func keyNotFound(err error) bool {
+	if err != nil {
+		if etcdError, ok := err.(etcd.Error); ok {
+			if etcdError.Code == etcd.ErrorCodeKeyNotFound ||
+				etcdError.Code == etcd.ErrorCodeNotFile ||
+				etcdError.Code == etcd.ErrorCodeNotDir {
+				return true
 			}
 			}
-		} else {
-			return err
 		}
 		}
 	}
 	}
-	return nil
+	return false
 }
 }
 
 
-// Get the value at "key", returns the last modified index
-// to use in conjunction to Atomic calls
+// Get the value at "key", returns the last modified
+// index to use in conjunction to Atomic calls
 func (s *Etcd) Get(key string) (pair *store.KVPair, err error) {
 func (s *Etcd) Get(key string) (pair *store.KVPair, err error) {
-	result, err := s.client.Get(store.Normalize(key), false, false)
+	getOpts := &etcd.GetOptions{
+		Quorum: true,
+	}
+
+	result, err := s.client.Get(context.Background(), s.normalize(key), getOpts)
 	if err != nil {
 	if err != nil {
-		if isKeyNotFoundError(err) {
+		if keyNotFound(err) {
 			return nil, store.ErrKeyNotFound
 			return nil, store.ErrKeyNotFound
 		}
 		}
 		return nil, err
 		return nil, err
@@ -151,40 +166,26 @@ func (s *Etcd) Get(key string) (pair *store.KVPair, err error) {
 
 
 // Put a value at "key"
 // Put a value at "key"
 func (s *Etcd) Put(key string, value []byte, opts *store.WriteOptions) error {
 func (s *Etcd) Put(key string, value []byte, opts *store.WriteOptions) error {
+	setOpts := &etcd.SetOptions{}
 
 
-	// Default TTL = 0 means no expiration
-	var ttl uint64
-	if opts != nil && opts.TTL > 0 {
-		ttl = uint64(opts.TTL.Seconds())
+	// Set options
+	if opts != nil {
+		setOpts.Dir = opts.IsDir
+		setOpts.TTL = opts.TTL
 	}
 	}
 
 
-	if _, err := s.client.Set(key, string(value), ttl); err != nil {
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
-
-			// Not a directory
-			if etcdError.ErrorCode == 104 {
-				// Remove the last element (the actual key)
-				// and create the full directory path
-				err = s.createDirectory(store.GetDirectory(key))
-				if err != nil {
-					return err
-				}
-
-				// Now that the directory is created, set the key
-				if _, err := s.client.Set(key, string(value), ttl); err != nil {
-					return err
-				}
-			}
-		}
-		return err
-	}
-	return nil
+	_, err := s.client.Set(context.Background(), s.normalize(key), string(value), setOpts)
+	return err
 }
 }
 
 
 // Delete a value at "key"
 // Delete a value at "key"
 func (s *Etcd) Delete(key string) error {
 func (s *Etcd) Delete(key string) error {
-	_, err := s.client.Delete(store.Normalize(key), false)
-	if isKeyNotFoundError(err) {
+	opts := &etcd.DeleteOptions{
+		Recursive: false,
+	}
+
+	_, err := s.client.Delete(context.Background(), s.normalize(key), opts)
+	if keyNotFound(err) {
 		return store.ErrKeyNotFound
 		return store.ErrKeyNotFound
 	}
 	}
 	return err
 	return err
@@ -208,130 +209,130 @@ func (s *Etcd) Exists(key string) (bool, error) {
 // be sent to the channel. Providing a non-nil stopCh can
 // be sent to the channel. Providing a non-nil stopCh can
 // be used to stop watching.
 // be used to stop watching.
 func (s *Etcd) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {
 func (s *Etcd) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {
-	// Start an etcd watch.
-	// Note: etcd will send the current value through the channel.
-	etcdWatchCh := make(chan *etcd.Response)
-	etcdStopCh := make(chan bool)
-	go s.client.Watch(store.Normalize(key), 0, false, etcdWatchCh, etcdStopCh)
-
-	// Adapter goroutine: The goal here is to convert whatever
-	// format etcd is using into our interface.
+	opts := &etcd.WatcherOptions{Recursive: false}
+	watcher := s.client.Watcher(s.normalize(key), opts)
+
+	// watchCh is sending back events to the caller
 	watchCh := make(chan *store.KVPair)
 	watchCh := make(chan *store.KVPair)
+
 	go func() {
 	go func() {
 		defer close(watchCh)
 		defer close(watchCh)
 
 
 		// Get the current value
 		// Get the current value
-		current, err := s.Get(key)
+		pair, err := s.Get(key)
 		if err != nil {
 		if err != nil {
 			return
 			return
 		}
 		}
 
 
 		// Push the current value through the channel.
 		// Push the current value through the channel.
-		watchCh <- current
+		watchCh <- pair
 
 
 		for {
 		for {
+			// Check if the watch was stopped by the caller
 			select {
 			select {
-			case result := <-etcdWatchCh:
-				if result == nil || result.Node == nil {
-					// Something went wrong, exit
-					// No need to stop the chan as the watch already ended
-					return
-				}
-				watchCh <- &store.KVPair{
-					Key:       key,
-					Value:     []byte(result.Node.Value),
-					LastIndex: result.Node.ModifiedIndex,
-				}
 			case <-stopCh:
 			case <-stopCh:
-				etcdStopCh <- true
 				return
 				return
+			default:
+			}
+
+			result, err := watcher.Next(context.Background())
+
+			if err != nil {
+				return
+			}
+
+			watchCh <- &store.KVPair{
+				Key:       key,
+				Value:     []byte(result.Node.Value),
+				LastIndex: result.Node.ModifiedIndex,
 			}
 			}
 		}
 		}
 	}()
 	}()
+
 	return watchCh, nil
 	return watchCh, nil
 }
 }
 
 
 // WatchTree watches for changes on a "directory"
 // WatchTree watches for changes on a "directory"
 // It returns a channel that will receive changes or pass
 // It returns a channel that will receive changes or pass
 // on errors. Upon creating a watch, the current childs values
 // on errors. Upon creating a watch, the current childs values
-// will be sent to the channel .Providing a non-nil stopCh can
+// will be sent to the channel. Providing a non-nil stopCh can
 // be used to stop watching.
 // be used to stop watching.
 func (s *Etcd) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {
 func (s *Etcd) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {
-	// Start the watch
-	etcdWatchCh := make(chan *etcd.Response)
-	etcdStopCh := make(chan bool)
-	go s.client.Watch(store.Normalize(directory), 0, true, etcdWatchCh, etcdStopCh)
+	watchOpts := &etcd.WatcherOptions{Recursive: true}
+	watcher := s.client.Watcher(s.normalize(directory), watchOpts)
 
 
-	// Adapter goroutine: The goal here is to convert whatever
-	// format etcd is using into our interface.
+	// watchCh is sending back events to the caller
 	watchCh := make(chan []*store.KVPair)
 	watchCh := make(chan []*store.KVPair)
+
 	go func() {
 	go func() {
 		defer close(watchCh)
 		defer close(watchCh)
 
 
 		// Get child values
 		// Get child values
-		current, err := s.List(directory)
+		list, err := s.List(directory)
 		if err != nil {
 		if err != nil {
 			return
 			return
 		}
 		}
 
 
 		// Push the current value through the channel.
 		// Push the current value through the channel.
-		watchCh <- current
+		watchCh <- list
 
 
 		for {
 		for {
+			// Check if the watch was stopped by the caller
 			select {
 			select {
-			case event := <-etcdWatchCh:
-				if event == nil {
-					// Something went wrong, exit
-					// No need to stop the chan as the watch already ended
-					return
-				}
-				// FIXME: We should probably use the value pushed by the channel.
-				// However, Node.Nodes seems to be empty.
-				if list, err := s.List(directory); err == nil {
-					watchCh <- list
-				}
 			case <-stopCh:
 			case <-stopCh:
-				etcdStopCh <- true
 				return
 				return
+			default:
 			}
 			}
+
+			_, err := watcher.Next(context.Background())
+
+			if err != nil {
+				return
+			}
+
+			list, err = s.List(directory)
+			if err != nil {
+				return
+			}
+
+			watchCh <- list
 		}
 		}
 	}()
 	}()
+
 	return watchCh, nil
 	return watchCh, nil
 }
 }
 
 
-// AtomicPut put a value at "key" if the key has not been
+// AtomicPut puts a value at "key" if the key has not been
 // modified in the meantime, throws an error if this is the case
 // modified in the meantime, throws an error if this is the case
-func (s *Etcd) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error) {
+func (s *Etcd) AtomicPut(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error) {
+	var (
+		meta *etcd.Response
+		err  error
+	)
+
+	setOpts := &etcd.SetOptions{}
 
 
-	var meta *etcd.Response
-	var err error
 	if previous != nil {
 	if previous != nil {
-		meta, err = s.client.CompareAndSwap(store.Normalize(key), string(value), 0, "", previous.LastIndex)
+		setOpts.PrevExist = etcd.PrevExist
+		setOpts.PrevIndex = previous.LastIndex
+		if previous.Value != nil {
+			setOpts.PrevValue = string(previous.Value)
+		}
 	} else {
 	} else {
-		// Interpret previous == nil as Atomic Create
-		meta, err = s.client.Create(store.Normalize(key), string(value), 0)
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
-
-			// Directory doesn't exist.
-			if etcdError.ErrorCode == 104 {
-				// Remove the last element (the actual key)
-				// and create the full directory path
-				err = s.createDirectory(store.GetDirectory(key))
-				if err != nil {
-					return false, nil, err
-				}
+		setOpts.PrevExist = etcd.PrevNoExist
+	}
 
 
-				// Now that the directory is created, create the key
-				if _, err := s.client.Create(key, string(value), 0); err != nil {
-					return false, nil, err
-				}
-			}
+	if opts != nil {
+		if opts.TTL > 0 {
+			setOpts.TTL = opts.TTL
 		}
 		}
 	}
 	}
+
+	meta, err = s.client.Set(context.Background(), s.normalize(key), string(value), setOpts)
 	if err != nil {
 	if err != nil {
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
-			// Compare Failed
-			if etcdError.ErrorCode == 101 {
+		if etcdError, ok := err.(etcd.Error); ok {
+			// Compare failed
+			if etcdError.Code == etcd.ErrorCodeTestFailed {
 				return false, nil, store.ErrKeyModified
 				return false, nil, store.ErrKeyModified
 			}
 			}
 		}
 		}
@@ -355,11 +356,20 @@ func (s *Etcd) AtomicDelete(key string, previous *store.KVPair) (bool, error) {
 		return false, store.ErrPreviousNotSpecified
 		return false, store.ErrPreviousNotSpecified
 	}
 	}
 
 
-	_, err := s.client.CompareAndDelete(store.Normalize(key), "", previous.LastIndex)
+	delOpts := &etcd.DeleteOptions{}
+
+	if previous != nil {
+		delOpts.PrevIndex = previous.LastIndex
+		if previous.Value != nil {
+			delOpts.PrevValue = string(previous.Value)
+		}
+	}
+
+	_, err := s.client.Delete(context.Background(), s.normalize(key), delOpts)
 	if err != nil {
 	if err != nil {
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
+		if etcdError, ok := err.(etcd.Error); ok {
 			// Compare failed
 			// Compare failed
-			if etcdError.ErrorCode == 101 {
+			if etcdError.Code == etcd.ErrorCodeTestFailed {
 				return false, store.ErrKeyModified
 				return false, store.ErrKeyModified
 			}
 			}
 		}
 		}
@@ -371,18 +381,24 @@ func (s *Etcd) AtomicDelete(key string, previous *store.KVPair) (bool, error) {
 
 
 // List child nodes of a given directory
 // List child nodes of a given directory
 func (s *Etcd) List(directory string) ([]*store.KVPair, error) {
 func (s *Etcd) List(directory string) ([]*store.KVPair, error) {
-	resp, err := s.client.Get(store.Normalize(directory), true, true)
+	getOpts := &etcd.GetOptions{
+		Quorum:    true,
+		Recursive: true,
+		Sort:      true,
+	}
+
+	resp, err := s.client.Get(context.Background(), s.normalize(directory), getOpts)
 	if err != nil {
 	if err != nil {
-		if isKeyNotFoundError(err) {
+		if keyNotFound(err) {
 			return nil, store.ErrKeyNotFound
 			return nil, store.ErrKeyNotFound
 		}
 		}
 		return nil, err
 		return nil, err
 	}
 	}
+
 	kv := []*store.KVPair{}
 	kv := []*store.KVPair{}
 	for _, n := range resp.Node.Nodes {
 	for _, n := range resp.Node.Nodes {
-		key := strings.TrimLeft(n.Key, "/")
 		kv = append(kv, &store.KVPair{
 		kv = append(kv, &store.KVPair{
-			Key:       key,
+			Key:       n.Key,
 			Value:     []byte(n.Value),
 			Value:     []byte(n.Value),
 			LastIndex: n.ModifiedIndex,
 			LastIndex: n.ModifiedIndex,
 		})
 		})
@@ -392,8 +408,12 @@ func (s *Etcd) List(directory string) ([]*store.KVPair, error) {
 
 
 // DeleteTree deletes a range of keys under a given directory
 // DeleteTree deletes a range of keys under a given directory
 func (s *Etcd) DeleteTree(directory string) error {
 func (s *Etcd) DeleteTree(directory string) error {
-	_, err := s.client.Delete(store.Normalize(directory), true)
-	if isKeyNotFoundError(err) {
+	delOpts := &etcd.DeleteOptions{
+		Recursive: true,
+	}
+
+	_, err := s.client.Delete(context.Background(), s.normalize(directory), delOpts)
+	if keyNotFound(err) {
 		return store.ErrKeyNotFound
 		return store.ErrKeyNotFound
 	}
 	}
 	return err
 	return err
@@ -403,7 +423,7 @@ func (s *Etcd) DeleteTree(directory string) error {
 // be used to provide mutual exclusion on a key
 // be used to provide mutual exclusion on a key
 func (s *Etcd) NewLock(key string, options *store.LockOptions) (lock store.Locker, err error) {
 func (s *Etcd) NewLock(key string, options *store.LockOptions) (lock store.Locker, err error) {
 	var value string
 	var value string
-	ttl := uint64(time.Duration(defaultLockTTL).Seconds())
+	ttl := defaultLockTTL
 	renewCh := make(chan struct{})
 	renewCh := make(chan struct{})
 
 
 	// Apply options on Lock
 	// Apply options on Lock
@@ -412,7 +432,7 @@ func (s *Etcd) NewLock(key string, options *store.LockOptions) (lock store.Locke
 			value = string(options.Value)
 			value = string(options.Value)
 		}
 		}
 		if options.TTL != 0 {
 		if options.TTL != 0 {
-			ttl = uint64(options.TTL.Seconds())
+			ttl = options.TTL
 		}
 		}
 		if options.RenewLock != nil {
 		if options.RenewLock != nil {
 			renewCh = options.RenewLock
 			renewCh = options.RenewLock
@@ -423,7 +443,7 @@ func (s *Etcd) NewLock(key string, options *store.LockOptions) (lock store.Locke
 	lock = &etcdLock{
 	lock = &etcdLock{
 		client:    s.client,
 		client:    s.client,
 		stopRenew: renewCh,
 		stopRenew: renewCh,
-		key:       key,
+		key:       s.normalize(key),
 		value:     value,
 		value:     value,
 		ttl:       ttl,
 		ttl:       ttl,
 	}
 	}
@@ -436,47 +456,58 @@ func (s *Etcd) NewLock(key string, options *store.LockOptions) (lock store.Locke
 // lock is lost or if an error occurs
 // lock is lost or if an error occurs
 func (l *etcdLock) Lock(stopChan chan struct{}) (<-chan struct{}, error) {
 func (l *etcdLock) Lock(stopChan chan struct{}) (<-chan struct{}, error) {
 
 
-	key := store.Normalize(l.key)
-
 	// Lock holder channel
 	// Lock holder channel
 	lockHeld := make(chan struct{})
 	lockHeld := make(chan struct{})
 	stopLocking := l.stopRenew
 	stopLocking := l.stopRenew
 
 
-	var lastIndex uint64
+	setOpts := &etcd.SetOptions{
+		TTL: l.ttl,
+	}
 
 
 	for {
 	for {
-		resp, err := l.client.Create(key, l.value, l.ttl)
+		setOpts.PrevExist = etcd.PrevNoExist
+		resp, err := l.client.Set(context.Background(), l.key, l.value, setOpts)
 		if err != nil {
 		if err != nil {
-			if etcdError, ok := err.(*etcd.EtcdError); ok {
-				// Key already exists
-				if etcdError.ErrorCode != 105 {
-					lastIndex = ^uint64(0)
+			if etcdError, ok := err.(etcd.Error); ok {
+				if etcdError.Code != etcd.ErrorCodeNodeExist {
+					return nil, err
 				}
 				}
+				setOpts.PrevIndex = ^uint64(0)
 			}
 			}
 		} else {
 		} else {
-			lastIndex = resp.Node.ModifiedIndex
+			setOpts.PrevIndex = resp.Node.ModifiedIndex
 		}
 		}
 
 
-		l.last, err = l.client.CompareAndSwap(key, l.value, l.ttl, "", lastIndex)
+		setOpts.PrevExist = etcd.PrevExist
+		l.last, err = l.client.Set(context.Background(), l.key, l.value, setOpts)
 
 
 		if err == nil {
 		if err == nil {
 			// Leader section
 			// Leader section
 			l.stopLock = stopLocking
 			l.stopLock = stopLocking
-			go l.holdLock(key, lockHeld, stopLocking)
+			go l.holdLock(l.key, lockHeld, stopLocking)
 			break
 			break
 		} else {
 		} else {
+			// If this is a legitimate error, return
+			if etcdError, ok := err.(etcd.Error); ok {
+				if etcdError.Code != etcd.ErrorCodeTestFailed {
+					return nil, err
+				}
+			}
+
 			// Seeker section
 			// Seeker section
-			chW := make(chan *etcd.Response)
+			errorCh := make(chan error)
 			chWStop := make(chan bool)
 			chWStop := make(chan bool)
 			free := make(chan bool)
 			free := make(chan bool)
 
 
-			go l.waitLock(key, chW, chWStop, free)
+			go l.waitLock(l.key, errorCh, chWStop, free)
 
 
 			// Wait for the key to be available or for
 			// Wait for the key to be available or for
 			// a signal to stop trying to lock the key
 			// a signal to stop trying to lock the key
 			select {
 			select {
 			case _ = <-free:
 			case _ = <-free:
 				break
 				break
+			case err := <-errorCh:
+				return nil, err
 			case _ = <-stopChan:
 			case _ = <-stopChan:
 				return nil, ErrAbortTryLock
 				return nil, ErrAbortTryLock
 			}
 			}
@@ -495,15 +526,17 @@ func (l *etcdLock) Lock(stopChan chan struct{}) (<-chan struct{}, error) {
 func (l *etcdLock) holdLock(key string, lockHeld chan struct{}, stopLocking <-chan struct{}) {
 func (l *etcdLock) holdLock(key string, lockHeld chan struct{}, stopLocking <-chan struct{}) {
 	defer close(lockHeld)
 	defer close(lockHeld)
 
 
-	update := time.NewTicker(time.Duration(l.ttl) * time.Second / 3)
+	update := time.NewTicker(l.ttl / 3)
 	defer update.Stop()
 	defer update.Stop()
 
 
 	var err error
 	var err error
+	setOpts := &etcd.SetOptions{TTL: l.ttl}
 
 
 	for {
 	for {
 		select {
 		select {
 		case <-update.C:
 		case <-update.C:
-			l.last, err = l.client.CompareAndSwap(key, l.value, l.ttl, "", l.last.Node.ModifiedIndex)
+			setOpts.PrevIndex = l.last.Node.ModifiedIndex
+			l.last, err = l.client.Set(context.Background(), key, l.value, setOpts)
 			if err != nil {
 			if err != nil {
 				return
 				return
 			}
 			}
@@ -515,12 +548,19 @@ func (l *etcdLock) holdLock(key string, lockHeld chan struct{}, stopLocking <-ch
 }
 }
 
 
 // WaitLock simply waits for the key to be available for creation
 // WaitLock simply waits for the key to be available for creation
-func (l *etcdLock) waitLock(key string, eventCh chan *etcd.Response, stopWatchCh chan bool, free chan<- bool) {
-	go l.client.Watch(key, 0, false, eventCh, stopWatchCh)
+func (l *etcdLock) waitLock(key string, errorCh chan error, stopWatchCh chan bool, free chan<- bool) {
+	opts := &etcd.WatcherOptions{Recursive: false}
+	watcher := l.client.Watcher(key, opts)
 
 
-	for event := range eventCh {
+	for {
+		event, err := watcher.Next(context.Background())
+		if err != nil {
+			errorCh <- err
+			return
+		}
 		if event.Action == "delete" || event.Action == "expire" {
 		if event.Action == "delete" || event.Action == "expire" {
 			free <- true
 			free <- true
+			return
 		}
 		}
 	}
 	}
 }
 }
@@ -532,7 +572,10 @@ func (l *etcdLock) Unlock() error {
 		l.stopLock <- struct{}{}
 		l.stopLock <- struct{}{}
 	}
 	}
 	if l.last != nil {
 	if l.last != nil {
-		_, err := l.client.CompareAndDelete(store.Normalize(l.key), l.value, l.last.Node.ModifiedIndex)
+		delOpts := &etcd.DeleteOptions{
+			PrevIndex: l.last.Node.ModifiedIndex,
+		}
+		_, err := l.client.Delete(context.Background(), l.key, delOpts)
 		if err != nil {
 		if err != nil {
 			return err
 			return err
 		}
 		}
@@ -544,15 +587,3 @@ func (l *etcdLock) Unlock() error {
 func (s *Etcd) Close() {
 func (s *Etcd) Close() {
 	return
 	return
 }
 }
-
-func isKeyNotFoundError(err error) bool {
-	if err != nil {
-		if etcdError, ok := err.(*etcd.EtcdError); ok {
-			// Not a Directory or Not a file
-			if etcdError.ErrorCode == 100 || etcdError.ErrorCode == 102 || etcdError.ErrorCode == 104 {
-				return true
-			}
-		}
-	}
-	return false
-}

+ 7 - 6
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/store.go

@@ -21,10 +21,10 @@ const (
 )
 )
 
 
 var (
 var (
-	// ErrNotSupported is thrown when the backend k/v store is not supported by libkv
-	ErrNotSupported = errors.New("Backend storage not supported yet, please choose one of")
-	// ErrNotImplemented is thrown when a method is not implemented by the current backend
-	ErrNotImplemented = errors.New("Call not implemented in current backend")
+	// ErrBackendNotSupported is thrown when the backend k/v store is not supported by libkv
+	ErrBackendNotSupported = errors.New("Backend storage not supported yet, please choose one of")
+	// ErrCallNotSupported is thrown when a method is not implemented/supported by the current backend
+	ErrCallNotSupported = errors.New("The current call is not supported with this backend")
 	// ErrNotReachable is thrown when the API cannot be reached for issuing common store operations
 	// ErrNotReachable is thrown when the API cannot be reached for issuing common store operations
 	ErrNotReachable = errors.New("Api not reachable")
 	ErrNotReachable = errors.New("Api not reachable")
 	// ErrCannotLock is thrown when there is an error acquiring a lock on a key
 	// ErrCannotLock is thrown when there is an error acquiring a lock on a key
@@ -47,7 +47,7 @@ type Config struct {
 }
 }
 
 
 // ClientTLSConfig contains data for a Client TLS configuration in the form
 // ClientTLSConfig contains data for a Client TLS configuration in the form
-//  the etcd client wants it.  Eventually we'll adapt it for ZK and Consul.
+// the etcd client wants it.  Eventually we'll adapt it for ZK and Consul.
 type ClientTLSConfig struct {
 type ClientTLSConfig struct {
 	CertFile   string
 	CertFile   string
 	KeyFile    string
 	KeyFile    string
@@ -109,7 +109,8 @@ type KVPair struct {
 
 
 // WriteOptions contains optional request parameters
 // WriteOptions contains optional request parameters
 type WriteOptions struct {
 type WriteOptions struct {
-	TTL time.Duration
+	IsDir bool
+	TTL   time.Duration
 }
 }
 
 
 // LockOptions contains optional request parameters
 // LockOptions contains optional request parameters

+ 1 - 1
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/store/zookeeper/zookeeper.go

@@ -310,7 +310,7 @@ func (s *Zookeeper) AtomicPut(key string, value []byte, previous *store.KVPair,
 			// Zookeeper will complain if the directory doesn't exist.
 			// Zookeeper will complain if the directory doesn't exist.
 			if err == zk.ErrNoNode {
 			if err == zk.ErrNoNode {
 				// Create the directory
 				// Create the directory
-				parts := store.SplitKey(key)
+				parts := store.SplitKey(strings.TrimSuffix(key, "/"))
 				parts = parts[:len(parts)-1]
 				parts = parts[:len(parts)-1]
 				if err = s.createFullPath(parts, false); err != nil {
 				if err = s.createFullPath(parts, false); err != nil {
 					// Failed to create the directory.
 					// Failed to create the directory.

+ 17 - 5
libnetwork/Godeps/_workspace/src/github.com/docker/libkv/testutils/utils.go

@@ -22,6 +22,7 @@ func RunTestCommon(t *testing.T, kv store.Store) {
 func RunTestAtomic(t *testing.T, kv store.Store) {
 func RunTestAtomic(t *testing.T, kv store.Store) {
 	testAtomicPut(t, kv)
 	testAtomicPut(t, kv)
 	testAtomicPutCreate(t, kv)
 	testAtomicPutCreate(t, kv)
+	testAtomicPutWithSlashSuffixKey(t, kv)
 	testAtomicDelete(t, kv)
 	testAtomicDelete(t, kv)
 }
 }
 
 
@@ -51,7 +52,7 @@ func RunTestTTL(t *testing.T, kv store.Store, backup store.Store) {
 
 
 func testPutGetDeleteExists(t *testing.T, kv store.Store) {
 func testPutGetDeleteExists(t *testing.T, kv store.Store) {
 	// Get a not exist key should return ErrKeyNotFound
 	// Get a not exist key should return ErrKeyNotFound
-	pair, err := kv.Get("/testPutGetDelete_not_exist_key")
+	pair, err := kv.Get("testPutGetDelete_not_exist_key")
 	assert.Equal(t, store.ErrKeyNotFound, err)
 	assert.Equal(t, store.ErrKeyNotFound, err)
 
 
 	value := []byte("bar")
 	value := []byte("bar")
@@ -62,6 +63,7 @@ func testPutGetDeleteExists(t *testing.T, kv store.Store) {
 		"testPutGetDeleteExists/testbar/testfoobar",
 		"testPutGetDeleteExists/testbar/testfoobar",
 	} {
 	} {
 		failMsg := fmt.Sprintf("Fail key %s", key)
 		failMsg := fmt.Sprintf("Fail key %s", key)
+
 		// Put the key
 		// Put the key
 		err = kv.Put(key, value, nil)
 		err = kv.Put(key, value, nil)
 		assert.NoError(t, err, failMsg)
 		assert.NoError(t, err, failMsg)
@@ -179,7 +181,7 @@ func testWatchTree(t *testing.T, kv store.Store) {
 
 
 	// Update loop
 	// Update loop
 	go func() {
 	go func() {
-		timeout := time.After(250 * time.Millisecond)
+		timeout := time.After(500 * time.Millisecond)
 		for {
 		for {
 			select {
 			select {
 			case <-timeout:
 			case <-timeout:
@@ -191,15 +193,17 @@ func testWatchTree(t *testing.T, kv store.Store) {
 	}()
 	}()
 
 
 	// Check for updates
 	// Check for updates
+	eventCount := 1
 	for {
 	for {
 		select {
 		select {
 		case event := <-events:
 		case event := <-events:
 			assert.NotNil(t, event)
 			assert.NotNil(t, event)
 			// We received the Delete event on a child node
 			// We received the Delete event on a child node
 			// Exit test successfully
 			// Exit test successfully
-			if len(event) == 2 {
+			if eventCount == 2 {
 				return
 				return
 			}
 			}
+			eventCount++
 		case <-time.After(4 * time.Second):
 		case <-time.After(4 * time.Second):
 			t.Fatal("Timeout reached")
 			t.Fatal("Timeout reached")
 			return
 			return
@@ -235,7 +239,7 @@ func testAtomicPut(t *testing.T, kv store.Store) {
 	assert.True(t, success)
 	assert.True(t, success)
 
 
 	// This CAS should fail, key exists.
 	// This CAS should fail, key exists.
-	pair.LastIndex = 0
+	pair.LastIndex = 6744
 	success, _, err = kv.AtomicPut(key, []byte("WORLDWORLD"), pair, nil)
 	success, _, err = kv.AtomicPut(key, []byte("WORLDWORLD"), pair, nil)
 	assert.Error(t, err)
 	assert.Error(t, err)
 	assert.False(t, success)
 	assert.False(t, success)
@@ -271,6 +275,13 @@ func testAtomicPutCreate(t *testing.T, kv store.Store) {
 	assert.True(t, success)
 	assert.True(t, success)
 }
 }
 
 
+func testAtomicPutWithSlashSuffixKey(t *testing.T, kv store.Store) {
+	k1 := "testAtomicPutWithSlashSuffixKey/key/"
+	success, _, err := kv.AtomicPut(k1, []byte{}, nil, nil)
+	assert.Nil(t, err)
+	assert.True(t, success)
+}
+
 func testAtomicDelete(t *testing.T, kv store.Store) {
 func testAtomicDelete(t *testing.T, kv store.Store) {
 	key := "testAtomicDelete"
 	key := "testAtomicDelete"
 	value := []byte("world")
 	value := []byte("world")
@@ -291,7 +302,7 @@ func testAtomicDelete(t *testing.T, kv store.Store) {
 	tempIndex := pair.LastIndex
 	tempIndex := pair.LastIndex
 
 
 	// AtomicDelete should fail
 	// AtomicDelete should fail
-	pair.LastIndex = 0
+	pair.LastIndex = 6744
 	success, err := kv.AtomicDelete(key, pair)
 	success, err := kv.AtomicDelete(key, pair)
 	assert.Error(t, err)
 	assert.Error(t, err)
 	assert.False(t, success)
 	assert.False(t, success)
@@ -585,6 +596,7 @@ func testDeleteTree(t *testing.T, kv store.Store) {
 // RunCleanup cleans up keys introduced by the tests
 // RunCleanup cleans up keys introduced by the tests
 func RunCleanup(t *testing.T, kv store.Store) {
 func RunCleanup(t *testing.T, kv store.Store) {
 	for _, key := range []string{
 	for _, key := range []string{
+		"testAtomicPutWithSlashSuffixKey",
 		"testPutGetDeleteExists",
 		"testPutGetDeleteExists",
 		"testWatch",
 		"testWatch",
 		"testWatchTree",
 		"testWatchTree",

+ 150 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go

@@ -0,0 +1,150 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+/*
+High Performance, Feature-Rich Idiomatic Go codec/encoding library for 
+binc, msgpack, cbor, json.
+
+Supported Serialization formats are:
+
+  - msgpack: https://github.com/msgpack/msgpack
+  - binc:    http://github.com/ugorji/binc
+  - cbor:    http://cbor.io http://tools.ietf.org/html/rfc7049
+  - json:    http://json.org http://tools.ietf.org/html/rfc7159
+  - simple: 
+
+To install:
+
+    go get github.com/ugorji/go/codec
+
+This package understands the 'unsafe' tag, to allow using unsafe semantics:
+
+  - When decoding into a struct, you need to read the field name as a string 
+    so you can find the struct field it is mapped to.
+    Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion.
+
+To install using unsafe, pass the 'unsafe' tag:
+
+    go get -tags=unsafe github.com/ugorji/go/codec
+
+For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer .
+
+The idiomatic Go support is as seen in other encoding packages in
+the standard library (ie json, xml, gob, etc).
+
+Rich Feature Set includes:
+
+  - Simple but extremely powerful and feature-rich API
+  - Very High Performance.
+    Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X.
+  - Multiple conversions:
+    Package coerces types where appropriate 
+    e.g. decode an int in the stream into a float, etc.
+  - Corner Cases: 
+    Overflows, nil maps/slices, nil values in streams are handled correctly
+  - Standard field renaming via tags
+  - Support for omitting empty fields during an encoding
+  - Encoding from any value and decoding into pointer to any value
+    (struct, slice, map, primitives, pointers, interface{}, etc)
+  - Extensions to support efficient encoding/decoding of any named types
+  - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces
+  - Decoding without a schema (into a interface{}).
+    Includes Options to configure what specific map or slice type to use
+    when decoding an encoded list or map into a nil interface{}
+  - Encode a struct as an array, and decode struct from an array in the data stream
+  - Comprehensive support for anonymous fields
+  - Fast (no-reflection) encoding/decoding of common maps and slices
+  - Code-generation for faster performance.
+  - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats
+  - Support indefinite-length formats to enable true streaming 
+    (for formats which support it e.g. json, cbor)
+  - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes.
+    This mostly applies to maps, where iteration order is non-deterministic.
+  - NIL in data stream decoded as zero value
+  - Never silently skip data when decoding.
+    User decides whether to return an error or silently skip data when keys or indexes
+    in the data stream do not map to fields in the struct.
+  - Encode/Decode from/to chan types (for iterative streaming support)
+  - Drop-in replacement for encoding/json. `json:` key in struct tag supported.
+  - Provides a RPC Server and Client Codec for net/rpc communication protocol.
+  - Handle unique idiosynchracies of codecs e.g. 
+    - For messagepack, configure how ambiguities in handling raw bytes are resolved 
+    - For messagepack, provide rpc server/client codec to support 
+      msgpack-rpc protocol defined at:
+      https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
+  
+Extension Support
+
+Users can register a function to handle the encoding or decoding of
+their custom types.
+
+There are no restrictions on what the custom type can be. Some examples:
+
+    type BisSet   []int
+    type BitSet64 uint64
+    type UUID     string
+    type MyStructWithUnexportedFields struct { a int; b bool; c []int; }
+    type GifImage struct { ... }
+
+As an illustration, MyStructWithUnexportedFields would normally be
+encoded as an empty map because it has no exported fields, while UUID
+would be encoded as a string. However, with extension support, you can
+encode any of these however you like.
+
+RPC
+
+RPC Client and Server Codecs are implemented, so the codecs can be used
+with the standard net/rpc package.
+
+Usage
+
+Typical usage model:
+
+    // create and configure Handle
+    var (
+      bh codec.BincHandle
+      mh codec.MsgpackHandle
+      ch codec.CborHandle
+    )
+
+    mh.MapType = reflect.TypeOf(map[string]interface{}(nil))
+
+    // configure extensions
+    // e.g. for msgpack, define functions and enable Time support for tag 1
+    // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt)
+
+    // create and use decoder/encoder
+    var (
+      r io.Reader
+      w io.Writer
+      b []byte
+      h = &bh // or mh to use msgpack
+    )
+
+    dec = codec.NewDecoder(r, h)
+    dec = codec.NewDecoderBytes(b, h)
+    err = dec.Decode(&v)
+
+    enc = codec.NewEncoder(w, h)
+    enc = codec.NewEncoderBytes(&b, h)
+    err = enc.Encode(v)
+
+    //RPC Server
+    go func() {
+        for {
+            conn, err := listener.Accept()
+            rpcCodec := codec.GoRpc.ServerCodec(conn, h)
+            //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h)
+            rpc.ServeCodec(rpcCodec)
+        }
+    }()
+
+    //RPC Communication (client side)
+    conn, err = net.Dial("tcp", "localhost:5555")
+    rpcCodec := codec.GoRpc.ClientCodec(conn, h)
+    //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h)
+    client := rpc.NewClientWithCodec(rpcCodec)
+
+*/
+package codec
+

+ 148 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md

@@ -0,0 +1,148 @@
+# Codec
+
+High Performance, Feature-Rich Idiomatic Go codec/encoding library for
+binc, msgpack, cbor, json.
+
+Supported Serialization formats are:
+
+  - msgpack: https://github.com/msgpack/msgpack
+  - binc:    http://github.com/ugorji/binc
+  - cbor:    http://cbor.io http://tools.ietf.org/html/rfc7049
+  - json:    http://json.org http://tools.ietf.org/html/rfc7159
+  - simple: 
+
+To install:
+
+    go get github.com/ugorji/go/codec
+
+This package understands the `unsafe` tag, to allow using unsafe semantics:
+
+  - When decoding into a struct, you need to read the field name as a string 
+    so you can find the struct field it is mapped to.
+    Using `unsafe` will bypass the allocation and copying overhead of `[]byte->string` conversion.
+
+To use it, you must pass the `unsafe` tag during install:
+
+```
+go install -tags=unsafe github.com/ugorji/go/codec 
+```
+
+Online documentation: http://godoc.org/github.com/ugorji/go/codec  
+Detailed Usage/How-to Primer: http://ugorji.net/blog/go-codec-primer
+
+The idiomatic Go support is as seen in other encoding packages in
+the standard library (ie json, xml, gob, etc).
+
+Rich Feature Set includes:
+
+  - Simple but extremely powerful and feature-rich API
+  - Very High Performance.
+    Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X.
+  - Multiple conversions:
+    Package coerces types where appropriate 
+    e.g. decode an int in the stream into a float, etc.
+  - Corner Cases: 
+    Overflows, nil maps/slices, nil values in streams are handled correctly
+  - Standard field renaming via tags
+  - Support for omitting empty fields during an encoding
+  - Encoding from any value and decoding into pointer to any value
+    (struct, slice, map, primitives, pointers, interface{}, etc)
+  - Extensions to support efficient encoding/decoding of any named types
+  - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces
+  - Decoding without a schema (into a interface{}).
+    Includes Options to configure what specific map or slice type to use
+    when decoding an encoded list or map into a nil interface{}
+  - Encode a struct as an array, and decode struct from an array in the data stream
+  - Comprehensive support for anonymous fields
+  - Fast (no-reflection) encoding/decoding of common maps and slices
+  - Code-generation for faster performance.
+  - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats
+  - Support indefinite-length formats to enable true streaming 
+    (for formats which support it e.g. json, cbor)
+  - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes.
+    This mostly applies to maps, where iteration order is non-deterministic.
+  - NIL in data stream decoded as zero value
+  - Never silently skip data when decoding.
+    User decides whether to return an error or silently skip data when keys or indexes
+    in the data stream do not map to fields in the struct.
+  - Encode/Decode from/to chan types (for iterative streaming support)
+  - Drop-in replacement for encoding/json. `json:` key in struct tag supported.
+  - Provides a RPC Server and Client Codec for net/rpc communication protocol.
+  - Handle unique idiosynchracies of codecs e.g. 
+    - For messagepack, configure how ambiguities in handling raw bytes are resolved 
+    - For messagepack, provide rpc server/client codec to support
+      msgpack-rpc protocol defined at:
+      https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md
+
+## Extension Support
+
+Users can register a function to handle the encoding or decoding of
+their custom types.
+
+There are no restrictions on what the custom type can be. Some examples:
+
+    type BisSet   []int
+    type BitSet64 uint64
+    type UUID     string
+    type MyStructWithUnexportedFields struct { a int; b bool; c []int; }
+    type GifImage struct { ... }
+
+As an illustration, MyStructWithUnexportedFields would normally be
+encoded as an empty map because it has no exported fields, while UUID
+would be encoded as a string. However, with extension support, you can
+encode any of these however you like.
+
+## RPC
+
+RPC Client and Server Codecs are implemented, so the codecs can be used
+with the standard net/rpc package.
+
+## Usage
+
+Typical usage model:
+
+    // create and configure Handle
+    var (
+      bh codec.BincHandle
+      mh codec.MsgpackHandle
+      ch codec.CborHandle
+    )
+
+    mh.MapType = reflect.TypeOf(map[string]interface{}(nil))
+
+    // configure extensions
+    // e.g. for msgpack, define functions and enable Time support for tag 1
+    // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt)
+
+    // create and use decoder/encoder
+    var (
+      r io.Reader
+      w io.Writer
+      b []byte
+      h = &bh // or mh to use msgpack
+    )
+
+    dec = codec.NewDecoder(r, h)
+    dec = codec.NewDecoderBytes(b, h)
+    err = dec.Decode(&v)
+
+    enc = codec.NewEncoder(w, h)
+    enc = codec.NewEncoderBytes(&b, h)
+    err = enc.Encode(v)
+
+    //RPC Server
+    go func() {
+        for {
+            conn, err := listener.Accept()
+            rpcCodec := codec.GoRpc.ServerCodec(conn, h)
+            //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h)
+            rpc.ServeCodec(rpcCodec)
+        }
+    }()
+
+    //RPC Communication (client side)
+    conn, err = net.Dial("tcp", "localhost:5555")
+    rpcCodec := codec.GoRpc.ClientCodec(conn, h)
+    //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h)
+    client := rpc.NewClientWithCodec(rpcCodec)
+

+ 901 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go

@@ -0,0 +1,901 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"math"
+	"time"
+)
+
+const bincDoPrune = true // No longer needed. Needed before as C lib did not support pruning.
+
+// vd as low 4 bits (there are 16 slots)
+const (
+	bincVdSpecial byte = iota
+	bincVdPosInt
+	bincVdNegInt
+	bincVdFloat
+
+	bincVdString
+	bincVdByteArray
+	bincVdArray
+	bincVdMap
+
+	bincVdTimestamp
+	bincVdSmallInt
+	bincVdUnicodeOther
+	bincVdSymbol
+
+	bincVdDecimal
+	_               // open slot
+	_               // open slot
+	bincVdCustomExt = 0x0f
+)
+
+const (
+	bincSpNil byte = iota
+	bincSpFalse
+	bincSpTrue
+	bincSpNan
+	bincSpPosInf
+	bincSpNegInf
+	bincSpZeroFloat
+	bincSpZero
+	bincSpNegOne
+)
+
+const (
+	bincFlBin16 byte = iota
+	bincFlBin32
+	_ // bincFlBin32e
+	bincFlBin64
+	_ // bincFlBin64e
+	// others not currently supported
+)
+
+type bincEncDriver struct {
+	e *Encoder
+	w encWriter
+	m map[string]uint16 // symbols
+	s uint16            // symbols sequencer
+	b [scratchByteArrayLen]byte
+	encNoSeparator
+}
+
+func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool {
+	return rt == timeTypId
+}
+
+func (e *bincEncDriver) EncodeBuiltin(rt uintptr, v interface{}) {
+	if rt == timeTypId {
+		bs := encodeTime(v.(time.Time))
+		e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs)))
+		e.w.writeb(bs)
+	}
+}
+
+func (e *bincEncDriver) EncodeNil() {
+	e.w.writen1(bincVdSpecial<<4 | bincSpNil)
+}
+
+func (e *bincEncDriver) EncodeBool(b bool) {
+	if b {
+		e.w.writen1(bincVdSpecial<<4 | bincSpTrue)
+	} else {
+		e.w.writen1(bincVdSpecial<<4 | bincSpFalse)
+	}
+}
+
+func (e *bincEncDriver) EncodeFloat32(f float32) {
+	if f == 0 {
+		e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat)
+		return
+	}
+	e.w.writen1(bincVdFloat<<4 | bincFlBin32)
+	bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f))
+}
+
+func (e *bincEncDriver) EncodeFloat64(f float64) {
+	if f == 0 {
+		e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat)
+		return
+	}
+	bigen.PutUint64(e.b[:8], math.Float64bits(f))
+	if bincDoPrune {
+		i := 7
+		for ; i >= 0 && (e.b[i] == 0); i-- {
+		}
+		i++
+		if i <= 6 {
+			e.w.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64)
+			e.w.writen1(byte(i))
+			e.w.writeb(e.b[:i])
+			return
+		}
+	}
+	e.w.writen1(bincVdFloat<<4 | bincFlBin64)
+	e.w.writeb(e.b[:8])
+}
+
+func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) {
+	if lim == 4 {
+		bigen.PutUint32(e.b[:lim], uint32(v))
+	} else {
+		bigen.PutUint64(e.b[:lim], v)
+	}
+	if bincDoPrune {
+		i := pruneSignExt(e.b[:lim], pos)
+		e.w.writen1(bd | lim - 1 - byte(i))
+		e.w.writeb(e.b[i:lim])
+	} else {
+		e.w.writen1(bd | lim - 1)
+		e.w.writeb(e.b[:lim])
+	}
+}
+
+func (e *bincEncDriver) EncodeInt(v int64) {
+	const nbd byte = bincVdNegInt << 4
+	if v >= 0 {
+		e.encUint(bincVdPosInt<<4, true, uint64(v))
+	} else if v == -1 {
+		e.w.writen1(bincVdSpecial<<4 | bincSpNegOne)
+	} else {
+		e.encUint(bincVdNegInt<<4, false, uint64(-v))
+	}
+}
+
+func (e *bincEncDriver) EncodeUint(v uint64) {
+	e.encUint(bincVdPosInt<<4, true, v)
+}
+
+func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) {
+	if v == 0 {
+		e.w.writen1(bincVdSpecial<<4 | bincSpZero)
+	} else if pos && v >= 1 && v <= 16 {
+		e.w.writen1(bincVdSmallInt<<4 | byte(v-1))
+	} else if v <= math.MaxUint8 {
+		e.w.writen2(bd|0x0, byte(v))
+	} else if v <= math.MaxUint16 {
+		e.w.writen1(bd | 0x01)
+		bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v))
+	} else if v <= math.MaxUint32 {
+		e.encIntegerPrune(bd, pos, v, 4)
+	} else {
+		e.encIntegerPrune(bd, pos, v, 8)
+	}
+}
+
+func (e *bincEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) {
+	bs := ext.WriteExt(rv)
+	if bs == nil {
+		e.EncodeNil()
+		return
+	}
+	e.encodeExtPreamble(uint8(xtag), len(bs))
+	e.w.writeb(bs)
+}
+
+func (e *bincEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) {
+	e.encodeExtPreamble(uint8(re.Tag), len(re.Data))
+	e.w.writeb(re.Data)
+}
+
+func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) {
+	e.encLen(bincVdCustomExt<<4, uint64(length))
+	e.w.writen1(xtag)
+}
+
+func (e *bincEncDriver) EncodeArrayStart(length int) {
+	e.encLen(bincVdArray<<4, uint64(length))
+}
+
+func (e *bincEncDriver) EncodeMapStart(length int) {
+	e.encLen(bincVdMap<<4, uint64(length))
+}
+
+func (e *bincEncDriver) EncodeString(c charEncoding, v string) {
+	l := uint64(len(v))
+	e.encBytesLen(c, l)
+	if l > 0 {
+		e.w.writestr(v)
+	}
+}
+
+func (e *bincEncDriver) EncodeSymbol(v string) {
+	// if WriteSymbolsNoRefs {
+	// 	e.encodeString(c_UTF8, v)
+	// 	return
+	// }
+
+	//symbols only offer benefit when string length > 1.
+	//This is because strings with length 1 take only 2 bytes to store
+	//(bd with embedded length, and single byte for string val).
+
+	l := len(v)
+	if l == 0 {
+		e.encBytesLen(c_UTF8, 0)
+		return
+	} else if l == 1 {
+		e.encBytesLen(c_UTF8, 1)
+		e.w.writen1(v[0])
+		return
+	}
+	if e.m == nil {
+		e.m = make(map[string]uint16, 16)
+	}
+	ui, ok := e.m[v]
+	if ok {
+		if ui <= math.MaxUint8 {
+			e.w.writen2(bincVdSymbol<<4, byte(ui))
+		} else {
+			e.w.writen1(bincVdSymbol<<4 | 0x8)
+			bigenHelper{e.b[:2], e.w}.writeUint16(ui)
+		}
+	} else {
+		e.s++
+		ui = e.s
+		//ui = uint16(atomic.AddUint32(&e.s, 1))
+		e.m[v] = ui
+		var lenprec uint8
+		if l <= math.MaxUint8 {
+			// lenprec = 0
+		} else if l <= math.MaxUint16 {
+			lenprec = 1
+		} else if int64(l) <= math.MaxUint32 {
+			lenprec = 2
+		} else {
+			lenprec = 3
+		}
+		if ui <= math.MaxUint8 {
+			e.w.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui))
+		} else {
+			e.w.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec)
+			bigenHelper{e.b[:2], e.w}.writeUint16(ui)
+		}
+		if lenprec == 0 {
+			e.w.writen1(byte(l))
+		} else if lenprec == 1 {
+			bigenHelper{e.b[:2], e.w}.writeUint16(uint16(l))
+		} else if lenprec == 2 {
+			bigenHelper{e.b[:4], e.w}.writeUint32(uint32(l))
+		} else {
+			bigenHelper{e.b[:8], e.w}.writeUint64(uint64(l))
+		}
+		e.w.writestr(v)
+	}
+}
+
+func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) {
+	l := uint64(len(v))
+	e.encBytesLen(c, l)
+	if l > 0 {
+		e.w.writeb(v)
+	}
+}
+
+func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) {
+	//TODO: support bincUnicodeOther (for now, just use string or bytearray)
+	if c == c_RAW {
+		e.encLen(bincVdByteArray<<4, length)
+	} else {
+		e.encLen(bincVdString<<4, length)
+	}
+}
+
+func (e *bincEncDriver) encLen(bd byte, l uint64) {
+	if l < 12 {
+		e.w.writen1(bd | uint8(l+4))
+	} else {
+		e.encLenNumber(bd, l)
+	}
+}
+
+func (e *bincEncDriver) encLenNumber(bd byte, v uint64) {
+	if v <= math.MaxUint8 {
+		e.w.writen2(bd, byte(v))
+	} else if v <= math.MaxUint16 {
+		e.w.writen1(bd | 0x01)
+		bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v))
+	} else if v <= math.MaxUint32 {
+		e.w.writen1(bd | 0x02)
+		bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v))
+	} else {
+		e.w.writen1(bd | 0x03)
+		bigenHelper{e.b[:8], e.w}.writeUint64(uint64(v))
+	}
+}
+
+//------------------------------------
+
+type bincDecSymbol struct {
+	i uint16
+	s string
+	b []byte
+}
+
+type bincDecDriver struct {
+	d      *Decoder
+	h      *BincHandle
+	r      decReader
+	br     bool // bytes reader
+	bdRead bool
+	bdType valueType
+	bd     byte
+	vd     byte
+	vs     byte
+	noStreamingCodec
+	decNoSeparator
+	b [scratchByteArrayLen]byte
+
+	// linear searching on this slice is ok,
+	// because we typically expect < 32 symbols in each stream.
+	s []bincDecSymbol
+}
+
+func (d *bincDecDriver) readNextBd() {
+	d.bd = d.r.readn1()
+	d.vd = d.bd >> 4
+	d.vs = d.bd & 0x0f
+	d.bdRead = true
+	d.bdType = valueTypeUnset
+}
+
+func (d *bincDecDriver) IsContainerType(vt valueType) (b bool) {
+	switch vt {
+	case valueTypeNil:
+		return d.vd == bincVdSpecial && d.vs == bincSpNil
+	case valueTypeBytes:
+		return d.vd == bincVdByteArray
+	case valueTypeString:
+		return d.vd == bincVdString
+	case valueTypeArray:
+		return d.vd == bincVdArray
+	case valueTypeMap:
+		return d.vd == bincVdMap
+	}
+	d.d.errorf("isContainerType: unsupported parameter: %v", vt)
+	return // "unreachable"
+}
+
+func (d *bincDecDriver) TryDecodeAsNil() bool {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.bd == bincVdSpecial<<4|bincSpNil {
+		d.bdRead = false
+		return true
+	}
+	return false
+}
+
+func (d *bincDecDriver) IsBuiltinType(rt uintptr) bool {
+	return rt == timeTypId
+}
+
+func (d *bincDecDriver) DecodeBuiltin(rt uintptr, v interface{}) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if rt == timeTypId {
+		if d.vd != bincVdTimestamp {
+			d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd)
+			return
+		}
+		tt, err := decodeTime(d.r.readx(int(d.vs)))
+		if err != nil {
+			panic(err)
+		}
+		var vt *time.Time = v.(*time.Time)
+		*vt = tt
+		d.bdRead = false
+	}
+}
+
+func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) {
+	if vs&0x8 == 0 {
+		d.r.readb(d.b[0:defaultLen])
+	} else {
+		l := d.r.readn1()
+		if l > 8 {
+			d.d.errorf("At most 8 bytes used to represent float. Received: %v bytes", l)
+			return
+		}
+		for i := l; i < 8; i++ {
+			d.b[i] = 0
+		}
+		d.r.readb(d.b[0:l])
+	}
+}
+
+func (d *bincDecDriver) decFloat() (f float64) {
+	//if true { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))); break; }
+	if x := d.vs & 0x7; x == bincFlBin32 {
+		d.decFloatPre(d.vs, 4)
+		f = float64(math.Float32frombits(bigen.Uint32(d.b[0:4])))
+	} else if x == bincFlBin64 {
+		d.decFloatPre(d.vs, 8)
+		f = math.Float64frombits(bigen.Uint64(d.b[0:8]))
+	} else {
+		d.d.errorf("only float32 and float64 are supported. d.vd: 0x%x, d.vs: 0x%x", d.vd, d.vs)
+		return
+	}
+	return
+}
+
+func (d *bincDecDriver) decUint() (v uint64) {
+	// need to inline the code (interface conversion and type assertion expensive)
+	switch d.vs {
+	case 0:
+		v = uint64(d.r.readn1())
+	case 1:
+		d.r.readb(d.b[6:8])
+		v = uint64(bigen.Uint16(d.b[6:8]))
+	case 2:
+		d.b[4] = 0
+		d.r.readb(d.b[5:8])
+		v = uint64(bigen.Uint32(d.b[4:8]))
+	case 3:
+		d.r.readb(d.b[4:8])
+		v = uint64(bigen.Uint32(d.b[4:8]))
+	case 4, 5, 6:
+		lim := int(7 - d.vs)
+		d.r.readb(d.b[lim:8])
+		for i := 0; i < lim; i++ {
+			d.b[i] = 0
+		}
+		v = uint64(bigen.Uint64(d.b[:8]))
+	case 7:
+		d.r.readb(d.b[:8])
+		v = uint64(bigen.Uint64(d.b[:8]))
+	default:
+		d.d.errorf("unsigned integers with greater than 64 bits of precision not supported")
+		return
+	}
+	return
+}
+
+func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	vd, vs := d.vd, d.vs
+	if vd == bincVdPosInt {
+		ui = d.decUint()
+	} else if vd == bincVdNegInt {
+		ui = d.decUint()
+		neg = true
+	} else if vd == bincVdSmallInt {
+		ui = uint64(d.vs) + 1
+	} else if vd == bincVdSpecial {
+		if vs == bincSpZero {
+			//i = 0
+		} else if vs == bincSpNegOne {
+			neg = true
+			ui = 1
+		} else {
+			d.d.errorf("numeric decode fails for special value: d.vs: 0x%x", d.vs)
+			return
+		}
+	} else {
+		d.d.errorf("number can only be decoded from uint or int values. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd)
+		return
+	}
+	return
+}
+
+func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) {
+	ui, neg := d.decCheckInteger()
+	i, overflow := chkOvf.SignedInt(ui)
+	if overflow {
+		d.d.errorf("simple: overflow converting %v to signed integer", ui)
+		return
+	}
+	if neg {
+		i = -i
+	}
+	if chkOvf.Int(i, bitsize) {
+		d.d.errorf("binc: overflow integer: %v", i)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) DecodeUint(bitsize uint8) (ui uint64) {
+	ui, neg := d.decCheckInteger()
+	if neg {
+		d.d.errorf("Assigning negative signed value to unsigned type")
+		return
+	}
+	if chkOvf.Uint(ui, bitsize) {
+		d.d.errorf("binc: overflow integer: %v", ui)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	vd, vs := d.vd, d.vs
+	if vd == bincVdSpecial {
+		d.bdRead = false
+		if vs == bincSpNan {
+			return math.NaN()
+		} else if vs == bincSpPosInf {
+			return math.Inf(1)
+		} else if vs == bincSpZeroFloat || vs == bincSpZero {
+			return
+		} else if vs == bincSpNegInf {
+			return math.Inf(-1)
+		} else {
+			d.d.errorf("Invalid d.vs decoding float where d.vd=bincVdSpecial: %v", d.vs)
+			return
+		}
+	} else if vd == bincVdFloat {
+		f = d.decFloat()
+	} else {
+		f = float64(d.DecodeInt(64))
+	}
+	if chkOverflow32 && chkOvf.Float32(f) {
+		d.d.errorf("binc: float32 overflow: %v", f)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+// bool can be decoded from bool only (single byte).
+func (d *bincDecDriver) DecodeBool() (b bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if bd := d.bd; bd == (bincVdSpecial | bincSpFalse) {
+		// b = false
+	} else if bd == (bincVdSpecial | bincSpTrue) {
+		b = true
+	} else {
+		d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) ReadMapStart() (length int) {
+	if d.vd != bincVdMap {
+		d.d.errorf("Invalid d.vd for map. Expecting 0x%x. Got: 0x%x", bincVdMap, d.vd)
+		return
+	}
+	length = d.decLen()
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) ReadArrayStart() (length int) {
+	if d.vd != bincVdArray {
+		d.d.errorf("Invalid d.vd for array. Expecting 0x%x. Got: 0x%x", bincVdArray, d.vd)
+		return
+	}
+	length = d.decLen()
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) decLen() int {
+	if d.vs > 3 {
+		return int(d.vs - 4)
+	}
+	return int(d.decLenNumber())
+}
+
+func (d *bincDecDriver) decLenNumber() (v uint64) {
+	if x := d.vs; x == 0 {
+		v = uint64(d.r.readn1())
+	} else if x == 1 {
+		d.r.readb(d.b[6:8])
+		v = uint64(bigen.Uint16(d.b[6:8]))
+	} else if x == 2 {
+		d.r.readb(d.b[4:8])
+		v = uint64(bigen.Uint32(d.b[4:8]))
+	} else {
+		d.r.readb(d.b[:8])
+		v = bigen.Uint64(d.b[:8])
+	}
+	return
+}
+
+func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) (bs2 []byte, s string) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.bd == bincVdSpecial<<4|bincSpNil {
+		d.bdRead = false
+		return
+	}
+	var slen int = -1
+	// var ok bool
+	switch d.vd {
+	case bincVdString, bincVdByteArray:
+		slen = d.decLen()
+		if zerocopy {
+			if d.br {
+				bs2 = d.r.readx(slen)
+			} else if len(bs) == 0 {
+				bs2 = decByteSlice(d.r, slen, d.b[:])
+			} else {
+				bs2 = decByteSlice(d.r, slen, bs)
+			}
+		} else {
+			bs2 = decByteSlice(d.r, slen, bs)
+		}
+		if withString {
+			s = string(bs2)
+		}
+	case bincVdSymbol:
+		// zerocopy doesn't apply for symbols,
+		// as the values must be stored in a table for later use.
+		//
+		//from vs: extract numSymbolBytes, containsStringVal, strLenPrecision,
+		//extract symbol
+		//if containsStringVal, read it and put in map
+		//else look in map for string value
+		var symbol uint16
+		vs := d.vs
+		if vs&0x8 == 0 {
+			symbol = uint16(d.r.readn1())
+		} else {
+			symbol = uint16(bigen.Uint16(d.r.readx(2)))
+		}
+		if d.s == nil {
+			d.s = make([]bincDecSymbol, 0, 16)
+		}
+
+		if vs&0x4 == 0 {
+			for i := range d.s {
+				j := &d.s[i]
+				if j.i == symbol {
+					bs2 = j.b
+					if withString {
+						if j.s == "" && bs2 != nil {
+							j.s = string(bs2)
+						}
+						s = j.s
+					}
+					break
+				}
+			}
+		} else {
+			switch vs & 0x3 {
+			case 0:
+				slen = int(d.r.readn1())
+			case 1:
+				slen = int(bigen.Uint16(d.r.readx(2)))
+			case 2:
+				slen = int(bigen.Uint32(d.r.readx(4)))
+			case 3:
+				slen = int(bigen.Uint64(d.r.readx(8)))
+			}
+			// since using symbols, do not store any part of
+			// the parameter bs in the map, as it might be a shared buffer.
+			// bs2 = decByteSlice(d.r, slen, bs)
+			bs2 = decByteSlice(d.r, slen, nil)
+			if withString {
+				s = string(bs2)
+			}
+			d.s = append(d.s, bincDecSymbol{symbol, s, bs2})
+		}
+	default:
+		d.d.errorf("Invalid d.vd. Expecting string:0x%x, bytearray:0x%x or symbol: 0x%x. Got: 0x%x",
+			bincVdString, bincVdByteArray, bincVdSymbol, d.vd)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) DecodeString() (s string) {
+	// DecodeBytes does not accomodate symbols, whose impl stores string version in map.
+	// Use decStringAndBytes directly.
+	// return string(d.DecodeBytes(d.b[:], true, true))
+	_, s = d.decStringAndBytes(d.b[:], true, true)
+	return
+}
+
+func (d *bincDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+	if isstring {
+		bsOut, _ = d.decStringAndBytes(bs, false, zerocopy)
+		return
+	}
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.bd == bincVdSpecial<<4|bincSpNil {
+		d.bdRead = false
+		return nil
+	}
+	var clen int
+	if d.vd == bincVdString || d.vd == bincVdByteArray {
+		clen = d.decLen()
+	} else {
+		d.d.errorf("Invalid d.vd for bytes. Expecting string:0x%x or bytearray:0x%x. Got: 0x%x",
+			bincVdString, bincVdByteArray, d.vd)
+		return
+	}
+	d.bdRead = false
+	if zerocopy {
+		if d.br {
+			return d.r.readx(clen)
+		} else if len(bs) == 0 {
+			bs = d.b[:]
+		}
+	}
+	return decByteSlice(d.r, clen, bs)
+}
+
+func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) {
+	if xtag > 0xff {
+		d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag)
+		return
+	}
+	realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag))
+	realxtag = uint64(realxtag1)
+	if ext == nil {
+		re := rv.(*RawExt)
+		re.Tag = realxtag
+		re.Data = detachZeroCopyBytes(d.br, re.Data, xbs)
+	} else {
+		ext.ReadExt(rv, xbs)
+	}
+	return
+}
+
+func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.vd == bincVdCustomExt {
+		l := d.decLen()
+		xtag = d.r.readn1()
+		if verifyTag && xtag != tag {
+			d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag)
+			return
+		}
+		xbs = d.r.readx(l)
+	} else if d.vd == bincVdByteArray {
+		xbs = d.DecodeBytes(nil, false, true)
+	} else {
+		d.d.errorf("Invalid d.vd for extensions (Expecting extensions or byte array). Got: 0x%x", d.vd)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *bincDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+
+	switch d.vd {
+	case bincVdSpecial:
+		switch d.vs {
+		case bincSpNil:
+			vt = valueTypeNil
+		case bincSpFalse:
+			vt = valueTypeBool
+			v = false
+		case bincSpTrue:
+			vt = valueTypeBool
+			v = true
+		case bincSpNan:
+			vt = valueTypeFloat
+			v = math.NaN()
+		case bincSpPosInf:
+			vt = valueTypeFloat
+			v = math.Inf(1)
+		case bincSpNegInf:
+			vt = valueTypeFloat
+			v = math.Inf(-1)
+		case bincSpZeroFloat:
+			vt = valueTypeFloat
+			v = float64(0)
+		case bincSpZero:
+			vt = valueTypeUint
+			v = uint64(0) // int8(0)
+		case bincSpNegOne:
+			vt = valueTypeInt
+			v = int64(-1) // int8(-1)
+		default:
+			d.d.errorf("decodeNaked: Unrecognized special value 0x%x", d.vs)
+			return
+		}
+	case bincVdSmallInt:
+		vt = valueTypeUint
+		v = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1
+	case bincVdPosInt:
+		vt = valueTypeUint
+		v = d.decUint()
+	case bincVdNegInt:
+		vt = valueTypeInt
+		v = -(int64(d.decUint()))
+	case bincVdFloat:
+		vt = valueTypeFloat
+		v = d.decFloat()
+	case bincVdSymbol:
+		vt = valueTypeSymbol
+		v = d.DecodeString()
+	case bincVdString:
+		vt = valueTypeString
+		v = d.DecodeString()
+	case bincVdByteArray:
+		vt = valueTypeBytes
+		v = d.DecodeBytes(nil, false, false)
+	case bincVdTimestamp:
+		vt = valueTypeTimestamp
+		tt, err := decodeTime(d.r.readx(int(d.vs)))
+		if err != nil {
+			panic(err)
+		}
+		v = tt
+	case bincVdCustomExt:
+		vt = valueTypeExt
+		l := d.decLen()
+		var re RawExt
+		re.Tag = uint64(d.r.readn1())
+		re.Data = d.r.readx(l)
+		v = &re
+		vt = valueTypeExt
+	case bincVdArray:
+		vt = valueTypeArray
+		decodeFurther = true
+	case bincVdMap:
+		vt = valueTypeMap
+		decodeFurther = true
+	default:
+		d.d.errorf("decodeNaked: Unrecognized d.vd: 0x%x", d.vd)
+		return
+	}
+
+	if !decodeFurther {
+		d.bdRead = false
+	}
+	if vt == valueTypeUint && d.h.SignedInteger {
+		d.bdType = valueTypeInt
+		v = int64(v.(uint64))
+	}
+	return
+}
+
+//------------------------------------
+
+//BincHandle is a Handle for the Binc Schema-Free Encoding Format
+//defined at https://github.com/ugorji/binc .
+//
+//BincHandle currently supports all Binc features with the following EXCEPTIONS:
+//  - only integers up to 64 bits of precision are supported.
+//    big integers are unsupported.
+//  - Only IEEE 754 binary32 and binary64 floats are supported (ie Go float32 and float64 types).
+//    extended precision and decimal IEEE 754 floats are unsupported.
+//  - Only UTF-8 strings supported.
+//    Unicode_Other Binc types (UTF16, UTF32) are currently unsupported.
+//
+//Note that these EXCEPTIONS are temporary and full support is possible and may happen soon.
+type BincHandle struct {
+	BasicHandle
+	binaryEncodingType
+}
+
+func (h *BincHandle) newEncDriver(e *Encoder) encDriver {
+	return &bincEncDriver{e: e, w: e.w}
+}
+
+func (h *BincHandle) newDecDriver(d *Decoder) decDriver {
+	return &bincDecDriver{d: d, r: d.r, h: h, br: d.bytes}
+}
+
+var _ decDriver = (*bincDecDriver)(nil)
+var _ encDriver = (*bincEncDriver)(nil)

+ 566 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go

@@ -0,0 +1,566 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import "math"
+
+const (
+	cborMajorUint byte = iota
+	cborMajorNegInt
+	cborMajorBytes
+	cborMajorText
+	cborMajorArray
+	cborMajorMap
+	cborMajorTag
+	cborMajorOther
+)
+
+const (
+	cborBdFalse byte = 0xf4 + iota
+	cborBdTrue
+	cborBdNil
+	cborBdUndefined
+	cborBdExt
+	cborBdFloat16
+	cborBdFloat32
+	cborBdFloat64
+)
+
+const (
+	cborBdIndefiniteBytes  byte = 0x5f
+	cborBdIndefiniteString      = 0x7f
+	cborBdIndefiniteArray       = 0x9f
+	cborBdIndefiniteMap         = 0xbf
+	cborBdBreak                 = 0xff
+)
+
+const (
+	CborStreamBytes  byte = 0x5f
+	CborStreamString      = 0x7f
+	CborStreamArray       = 0x9f
+	CborStreamMap         = 0xbf
+	CborStreamBreak       = 0xff
+)
+
+const (
+	cborBaseUint   byte = 0x00
+	cborBaseNegInt      = 0x20
+	cborBaseBytes       = 0x40
+	cborBaseString      = 0x60
+	cborBaseArray       = 0x80
+	cborBaseMap         = 0xa0
+	cborBaseTag         = 0xc0
+	cborBaseSimple      = 0xe0
+)
+
+// -------------------
+
+type cborEncDriver struct {
+	e *Encoder
+	w encWriter
+	h *CborHandle
+	noBuiltInTypes
+	encNoSeparator
+	x [8]byte
+}
+
+func (e *cborEncDriver) EncodeNil() {
+	e.w.writen1(cborBdNil)
+}
+
+func (e *cborEncDriver) EncodeBool(b bool) {
+	if b {
+		e.w.writen1(cborBdTrue)
+	} else {
+		e.w.writen1(cborBdFalse)
+	}
+}
+
+func (e *cborEncDriver) EncodeFloat32(f float32) {
+	e.w.writen1(cborBdFloat32)
+	bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f))
+}
+
+func (e *cborEncDriver) EncodeFloat64(f float64) {
+	e.w.writen1(cborBdFloat64)
+	bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f))
+}
+
+func (e *cborEncDriver) encUint(v uint64, bd byte) {
+	if v <= 0x17 {
+		e.w.writen1(byte(v) + bd)
+	} else if v <= math.MaxUint8 {
+		e.w.writen2(bd+0x18, uint8(v))
+	} else if v <= math.MaxUint16 {
+		e.w.writen1(bd + 0x19)
+		bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v))
+	} else if v <= math.MaxUint32 {
+		e.w.writen1(bd + 0x1a)
+		bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v))
+	} else { // if v <= math.MaxUint64 {
+		e.w.writen1(bd + 0x1b)
+		bigenHelper{e.x[:8], e.w}.writeUint64(v)
+	}
+}
+
+func (e *cborEncDriver) EncodeInt(v int64) {
+	if v < 0 {
+		e.encUint(uint64(-1-v), cborBaseNegInt)
+	} else {
+		e.encUint(uint64(v), cborBaseUint)
+	}
+}
+
+func (e *cborEncDriver) EncodeUint(v uint64) {
+	e.encUint(v, cborBaseUint)
+}
+
+func (e *cborEncDriver) encLen(bd byte, length int) {
+	e.encUint(uint64(length), bd)
+}
+
+func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) {
+	e.encUint(uint64(xtag), cborBaseTag)
+	if v := ext.ConvertExt(rv); v == nil {
+		e.EncodeNil()
+	} else {
+		en.encode(v)
+	}
+}
+
+func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) {
+	e.encUint(uint64(re.Tag), cborBaseTag)
+	if re.Data != nil {
+		en.encode(re.Data)
+	} else if re.Value == nil {
+		e.EncodeNil()
+	} else {
+		en.encode(re.Value)
+	}
+}
+
+func (e *cborEncDriver) EncodeArrayStart(length int) {
+	e.encLen(cborBaseArray, length)
+}
+
+func (e *cborEncDriver) EncodeMapStart(length int) {
+	e.encLen(cborBaseMap, length)
+}
+
+func (e *cborEncDriver) EncodeString(c charEncoding, v string) {
+	e.encLen(cborBaseString, len(v))
+	e.w.writestr(v)
+}
+
+func (e *cborEncDriver) EncodeSymbol(v string) {
+	e.EncodeString(c_UTF8, v)
+}
+
+func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) {
+	e.encLen(cborBaseBytes, len(v))
+	e.w.writeb(v)
+}
+
+// ----------------------
+
+type cborDecDriver struct {
+	d      *Decoder
+	h      *CborHandle
+	r      decReader
+	br     bool // bytes reader
+	bdRead bool
+	bdType valueType
+	bd     byte
+	b      [scratchByteArrayLen]byte
+	noBuiltInTypes
+	decNoSeparator
+}
+
+func (d *cborDecDriver) readNextBd() {
+	d.bd = d.r.readn1()
+	d.bdRead = true
+	d.bdType = valueTypeUnset
+}
+
+func (d *cborDecDriver) IsContainerType(vt valueType) (bv bool) {
+	switch vt {
+	case valueTypeNil:
+		return d.bd == cborBdNil
+	case valueTypeBytes:
+		return d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString)
+	case valueTypeString:
+		return d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray)
+	case valueTypeArray:
+		return d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap)
+	case valueTypeMap:
+		return d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag)
+	}
+	d.d.errorf("isContainerType: unsupported parameter: %v", vt)
+	return // "unreachable"
+}
+
+func (d *cborDecDriver) TryDecodeAsNil() bool {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	// treat Nil and Undefined as nil values
+	if d.bd == cborBdNil || d.bd == cborBdUndefined {
+		d.bdRead = false
+		return true
+	}
+	return false
+}
+
+func (d *cborDecDriver) CheckBreak() bool {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.bd == cborBdBreak {
+		d.bdRead = false
+		return true
+	}
+	return false
+}
+
+func (d *cborDecDriver) decUint() (ui uint64) {
+	v := d.bd & 0x1f
+	if v <= 0x17 {
+		ui = uint64(v)
+	} else {
+		if v == 0x18 {
+			ui = uint64(d.r.readn1())
+		} else if v == 0x19 {
+			ui = uint64(bigen.Uint16(d.r.readx(2)))
+		} else if v == 0x1a {
+			ui = uint64(bigen.Uint32(d.r.readx(4)))
+		} else if v == 0x1b {
+			ui = uint64(bigen.Uint64(d.r.readx(8)))
+		} else {
+			d.d.errorf("decUint: Invalid descriptor: %v", d.bd)
+			return
+		}
+	}
+	return
+}
+
+func (d *cborDecDriver) decCheckInteger() (neg bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	major := d.bd >> 5
+	if major == cborMajorUint {
+	} else if major == cborMajorNegInt {
+		neg = true
+	} else {
+		d.d.errorf("invalid major: %v (bd: %v)", major, d.bd)
+		return
+	}
+	return
+}
+
+func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) {
+	neg := d.decCheckInteger()
+	ui := d.decUint()
+	// check if this number can be converted to an int without overflow
+	var overflow bool
+	if neg {
+		if i, overflow = chkOvf.SignedInt(ui + 1); overflow {
+			d.d.errorf("cbor: overflow converting %v to signed integer", ui+1)
+			return
+		}
+		i = -i
+	} else {
+		if i, overflow = chkOvf.SignedInt(ui); overflow {
+			d.d.errorf("cbor: overflow converting %v to signed integer", ui)
+			return
+		}
+	}
+	if chkOvf.Int(i, bitsize) {
+		d.d.errorf("cbor: overflow integer: %v", i)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) {
+	if d.decCheckInteger() {
+		d.d.errorf("Assigning negative signed value to unsigned type")
+		return
+	}
+	ui = d.decUint()
+	if chkOvf.Uint(ui, bitsize) {
+		d.d.errorf("cbor: overflow integer: %v", ui)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if bd := d.bd; bd == cborBdFloat16 {
+		f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2)))))
+	} else if bd == cborBdFloat32 {
+		f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4))))
+	} else if bd == cborBdFloat64 {
+		f = math.Float64frombits(bigen.Uint64(d.r.readx(8)))
+	} else if bd >= cborBaseUint && bd < cborBaseBytes {
+		f = float64(d.DecodeInt(64))
+	} else {
+		d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd)
+		return
+	}
+	if chkOverflow32 && chkOvf.Float32(f) {
+		d.d.errorf("cbor: float32 overflow: %v", f)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+// bool can be decoded from bool only (single byte).
+func (d *cborDecDriver) DecodeBool() (b bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if bd := d.bd; bd == cborBdTrue {
+		b = true
+	} else if bd == cborBdFalse {
+	} else {
+		d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd)
+		return
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *cborDecDriver) ReadMapStart() (length int) {
+	d.bdRead = false
+	if d.bd == cborBdIndefiniteMap {
+		return -1
+	}
+	return d.decLen()
+}
+
+func (d *cborDecDriver) ReadArrayStart() (length int) {
+	d.bdRead = false
+	if d.bd == cborBdIndefiniteArray {
+		return -1
+	}
+	return d.decLen()
+}
+
+func (d *cborDecDriver) decLen() int {
+	return int(d.decUint())
+}
+
+func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte {
+	d.bdRead = false
+	for {
+		if d.CheckBreak() {
+			break
+		}
+		if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText {
+			d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd)
+			return nil
+		}
+		n := d.decLen()
+		oldLen := len(bs)
+		newLen := oldLen + n
+		if newLen > cap(bs) {
+			bs2 := make([]byte, newLen, 2*cap(bs)+n)
+			copy(bs2, bs)
+			bs = bs2
+		} else {
+			bs = bs[:newLen]
+		}
+		d.r.readb(bs[oldLen:newLen])
+		// bs = append(bs, d.r.readn()...)
+		d.bdRead = false
+	}
+	d.bdRead = false
+	return bs
+}
+
+func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	if d.bd == cborBdNil || d.bd == cborBdUndefined {
+		d.bdRead = false
+		return nil
+	}
+	if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString {
+		if bs == nil {
+			return d.decAppendIndefiniteBytes(nil)
+		}
+		return d.decAppendIndefiniteBytes(bs[:0])
+	}
+	clen := d.decLen()
+	d.bdRead = false
+	if zerocopy {
+		if d.br {
+			return d.r.readx(clen)
+		} else if len(bs) == 0 {
+			bs = d.b[:]
+		}
+	}
+	return decByteSlice(d.r, clen, bs)
+}
+
+func (d *cborDecDriver) DecodeString() (s string) {
+	return string(d.DecodeBytes(d.b[:], true, true))
+}
+
+func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+	u := d.decUint()
+	d.bdRead = false
+	realxtag = u
+	if ext == nil {
+		re := rv.(*RawExt)
+		re.Tag = realxtag
+		d.d.decode(&re.Value)
+	} else if xtag != realxtag {
+		d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag)
+		return
+	} else {
+		var v interface{}
+		d.d.decode(&v)
+		ext.UpdateExt(rv, v)
+	}
+	d.bdRead = false
+	return
+}
+
+func (d *cborDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) {
+	if !d.bdRead {
+		d.readNextBd()
+	}
+
+	switch d.bd {
+	case cborBdNil:
+		vt = valueTypeNil
+	case cborBdFalse:
+		vt = valueTypeBool
+		v = false
+	case cborBdTrue:
+		vt = valueTypeBool
+		v = true
+	case cborBdFloat16, cborBdFloat32:
+		vt = valueTypeFloat
+		v = d.DecodeFloat(true)
+	case cborBdFloat64:
+		vt = valueTypeFloat
+		v = d.DecodeFloat(false)
+	case cborBdIndefiniteBytes:
+		vt = valueTypeBytes
+		v = d.DecodeBytes(nil, false, false)
+	case cborBdIndefiniteString:
+		vt = valueTypeString
+		v = d.DecodeString()
+	case cborBdIndefiniteArray:
+		vt = valueTypeArray
+		decodeFurther = true
+	case cborBdIndefiniteMap:
+		vt = valueTypeMap
+		decodeFurther = true
+	default:
+		switch {
+		case d.bd >= cborBaseUint && d.bd < cborBaseNegInt:
+			if d.h.SignedInteger {
+				vt = valueTypeInt
+				v = d.DecodeInt(64)
+			} else {
+				vt = valueTypeUint
+				v = d.DecodeUint(64)
+			}
+		case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes:
+			vt = valueTypeInt
+			v = d.DecodeInt(64)
+		case d.bd >= cborBaseBytes && d.bd < cborBaseString:
+			vt = valueTypeBytes
+			v = d.DecodeBytes(nil, false, false)
+		case d.bd >= cborBaseString && d.bd < cborBaseArray:
+			vt = valueTypeString
+			v = d.DecodeString()
+		case d.bd >= cborBaseArray && d.bd < cborBaseMap:
+			vt = valueTypeArray
+			decodeFurther = true
+		case d.bd >= cborBaseMap && d.bd < cborBaseTag:
+			vt = valueTypeMap
+			decodeFurther = true
+		case d.bd >= cborBaseTag && d.bd < cborBaseSimple:
+			vt = valueTypeExt
+			var re RawExt
+			ui := d.decUint()
+			d.bdRead = false
+			re.Tag = ui
+			d.d.decode(&re.Value)
+			v = &re
+			// decodeFurther = true
+		default:
+			d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd)
+			return
+		}
+	}
+
+	if !decodeFurther {
+		d.bdRead = false
+	}
+	return
+}
+
+// -------------------------
+
+// CborHandle is a Handle for the CBOR encoding format,
+// defined at http://tools.ietf.org/html/rfc7049 and documented further at http://cbor.io .
+//
+// CBOR is comprehensively supported, including support for:
+//   - indefinite-length arrays/maps/bytes/strings
+//   - (extension) tags in range 0..0xffff (0 .. 65535)
+//   - half, single and double-precision floats
+//   - all numbers (1, 2, 4 and 8-byte signed and unsigned integers)
+//   - nil, true, false, ...
+//   - arrays and maps, bytes and text strings
+//
+// None of the optional extensions (with tags) defined in the spec are supported out-of-the-box.
+// Users can implement them as needed (using SetExt), including spec-documented ones:
+//   - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc.
+//
+// To encode with indefinite lengths (streaming), users will use
+// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants.
+//
+// For example, to encode "one-byte" as an indefinite length string:
+//     var buf bytes.Buffer
+//     e := NewEncoder(&buf, new(CborHandle))
+//     buf.WriteByte(CborStreamString)
+//     e.MustEncode("one-")
+//     e.MustEncode("byte")
+//     buf.WriteByte(CborStreamBreak)
+//     encodedBytes := buf.Bytes()
+//     var vv interface{}
+//     NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv)
+//     // Now, vv contains the same string "one-byte"
+//
+type CborHandle struct {
+	BasicHandle
+	binaryEncodingType
+}
+
+func (h *CborHandle) newEncDriver(e *Encoder) encDriver {
+	return &cborEncDriver{e: e, w: e.w, h: h}
+}
+
+func (h *CborHandle) newDecDriver(d *Decoder) decDriver {
+	return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes}
+}
+
+var _ decDriver = (*cborDecDriver)(nil)
+var _ encDriver = (*cborEncDriver)(nil)

+ 205 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go

@@ -0,0 +1,205 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"bufio"
+	"bytes"
+	"encoding/hex"
+	"math"
+	"os"
+	"regexp"
+	"strings"
+	"testing"
+)
+
+func TestCborIndefiniteLength(t *testing.T) {
+	oldMapType := testCborH.MapType
+	defer func() {
+		testCborH.MapType = oldMapType
+	}()
+	testCborH.MapType = testMapStrIntfTyp
+	// var (
+	// 	M1 map[string][]byte
+	// 	M2 map[uint64]bool
+	// 	L1 []interface{}
+	// 	S1 []string
+	// 	B1 []byte
+	// )
+	var v, vv interface{}
+	// define it (v), encode it using indefinite lengths, decode it (vv), compare v to vv
+	v = map[string]interface{}{
+		"one-byte-key":   []byte{1, 2, 3, 4, 5, 6},
+		"two-string-key": "two-value",
+		"three-list-key": []interface{}{true, false, uint64(1), int64(-1)},
+	}
+	var buf bytes.Buffer
+	// buf.Reset()
+	e := NewEncoder(&buf, testCborH)
+	buf.WriteByte(cborBdIndefiniteMap)
+	//----
+	buf.WriteByte(cborBdIndefiniteString)
+	e.MustEncode("one-")
+	e.MustEncode("byte-")
+	e.MustEncode("key")
+	buf.WriteByte(cborBdBreak)
+
+	buf.WriteByte(cborBdIndefiniteBytes)
+	e.MustEncode([]byte{1, 2, 3})
+	e.MustEncode([]byte{4, 5, 6})
+	buf.WriteByte(cborBdBreak)
+
+	//----
+	buf.WriteByte(cborBdIndefiniteString)
+	e.MustEncode("two-")
+	e.MustEncode("string-")
+	e.MustEncode("key")
+	buf.WriteByte(cborBdBreak)
+
+	buf.WriteByte(cborBdIndefiniteString)
+	e.MustEncode([]byte("two-")) // encode as bytes, to check robustness of code
+	e.MustEncode([]byte("value"))
+	buf.WriteByte(cborBdBreak)
+
+	//----
+	buf.WriteByte(cborBdIndefiniteString)
+	e.MustEncode("three-")
+	e.MustEncode("list-")
+	e.MustEncode("key")
+	buf.WriteByte(cborBdBreak)
+
+	buf.WriteByte(cborBdIndefiniteArray)
+	e.MustEncode(true)
+	e.MustEncode(false)
+	e.MustEncode(uint64(1))
+	e.MustEncode(int64(-1))
+	buf.WriteByte(cborBdBreak)
+
+	buf.WriteByte(cborBdBreak) // close map
+
+	NewDecoderBytes(buf.Bytes(), testCborH).MustDecode(&vv)
+	if err := deepEqual(v, vv); err != nil {
+		logT(t, "-------- Before and After marshal do not match: Error: %v", err)
+		logT(t, "    ....... GOLDEN:  (%T) %#v", v, v)
+		logT(t, "    ....... DECODED: (%T) %#v", vv, vv)
+		failT(t)
+	}
+}
+
+type testCborGolden struct {
+	Base64     string      `codec:"cbor"`
+	Hex        string      `codec:"hex"`
+	Roundtrip  bool        `codec:"roundtrip"`
+	Decoded    interface{} `codec:"decoded"`
+	Diagnostic string      `codec:"diagnostic"`
+	Skip       bool        `codec:"skip"`
+}
+
+// Some tests are skipped because they include numbers outside the range of int64/uint64
+func doTestCborGoldens(t *testing.T) {
+	oldMapType := testCborH.MapType
+	defer func() {
+		testCborH.MapType = oldMapType
+	}()
+	testCborH.MapType = testMapStrIntfTyp
+	// decode test-cbor-goldens.json into a list of []*testCborGolden
+	// for each one,
+	// - decode hex into []byte bs
+	// - decode bs into interface{} v
+	// - compare both using deepequal
+	// - for any miss, record it
+	var gs []*testCborGolden
+	f, err := os.Open("test-cbor-goldens.json")
+	if err != nil {
+		logT(t, "error opening test-cbor-goldens.json: %v", err)
+		failT(t)
+	}
+	defer f.Close()
+	jh := new(JsonHandle)
+	jh.MapType = testMapStrIntfTyp
+	// d := NewDecoder(f, jh)
+	d := NewDecoder(bufio.NewReader(f), jh)
+	// err = d.Decode(&gs)
+	d.MustDecode(&gs)
+	if err != nil {
+		logT(t, "error json decoding test-cbor-goldens.json: %v", err)
+		failT(t)
+	}
+
+	tagregex := regexp.MustCompile(`[\d]+\(.+?\)`)
+	hexregex := regexp.MustCompile(`h'([0-9a-fA-F]*)'`)
+	for i, g := range gs {
+		// fmt.Printf("%v, skip: %v, isTag: %v, %s\n", i, g.Skip, tagregex.MatchString(g.Diagnostic), g.Diagnostic)
+		// skip tags or simple or those with prefix, as we can't verify them.
+		if g.Skip || strings.HasPrefix(g.Diagnostic, "simple(") || tagregex.MatchString(g.Diagnostic) {
+			// fmt.Printf("%v: skipped\n", i)
+			logT(t, "[%v] skipping because skip=true OR unsupported simple value or Tag Value", i)
+			continue
+		}
+		// println("++++++++++++", i, "g.Diagnostic", g.Diagnostic)
+		if hexregex.MatchString(g.Diagnostic) {
+			// println(i, "g.Diagnostic matched hex")
+			if s2 := g.Diagnostic[2 : len(g.Diagnostic)-1]; s2 == "" {
+				g.Decoded = zeroByteSlice
+			} else if bs2, err2 := hex.DecodeString(s2); err2 == nil {
+				g.Decoded = bs2
+			}
+			// fmt.Printf("%v: hex: %v\n", i, g.Decoded)
+		}
+		bs, err := hex.DecodeString(g.Hex)
+		if err != nil {
+			logT(t, "[%v] error hex decoding %s [%v]: %v", i, g.Hex, err)
+			failT(t)
+		}
+		var v interface{}
+		NewDecoderBytes(bs, testCborH).MustDecode(&v)
+		if _, ok := v.(RawExt); ok {
+			continue
+		}
+		// check the diagnostics to compare
+		switch g.Diagnostic {
+		case "Infinity":
+			b := math.IsInf(v.(float64), 1)
+			testCborError(t, i, math.Inf(1), v, nil, &b)
+		case "-Infinity":
+			b := math.IsInf(v.(float64), -1)
+			testCborError(t, i, math.Inf(-1), v, nil, &b)
+		case "NaN":
+			// println(i, "checking NaN")
+			b := math.IsNaN(v.(float64))
+			testCborError(t, i, math.NaN(), v, nil, &b)
+		case "undefined":
+			b := v == nil
+			testCborError(t, i, nil, v, nil, &b)
+		default:
+			v0 := g.Decoded
+			// testCborCoerceJsonNumber(reflect.ValueOf(&v0))
+			testCborError(t, i, v0, v, deepEqual(v0, v), nil)
+		}
+	}
+}
+
+func testCborError(t *testing.T, i int, v0, v1 interface{}, err error, equal *bool) {
+	if err == nil && equal == nil {
+		// fmt.Printf("%v testCborError passed (err and equal nil)\n", i)
+		return
+	}
+	if err != nil {
+		logT(t, "[%v] deepEqual error: %v", i, err)
+		logT(t, "    ....... GOLDEN:  (%T) %#v", v0, v0)
+		logT(t, "    ....... DECODED: (%T) %#v", v1, v1)
+		failT(t)
+	}
+	if equal != nil && !*equal {
+		logT(t, "[%v] values not equal", i)
+		logT(t, "    ....... GOLDEN:  (%T) %#v", v0, v0)
+		logT(t, "    ....... DECODED: (%T) %#v", v1, v1)
+		failT(t)
+	}
+	// fmt.Printf("%v testCborError passed (checks passed)\n", i)
+}
+
+func TestCborGoldens(t *testing.T) {
+	doTestCborGoldens(t)
+}

+ 1117 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go

@@ -0,0 +1,1117 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// Test works by using a slice of interfaces.
+// It can test for encoding/decoding into/from a nil interface{}
+// or passing the object to encode/decode into.
+//
+// There are basically 2 main tests here.
+// First test internally encodes and decodes things and verifies that
+// the artifact was as expected.
+// Second test will use python msgpack to create a bunch of golden files,
+// read those files, and compare them to what it should be. It then
+// writes those files back out and compares the byte streams.
+//
+// Taken together, the tests are pretty extensive.
+//
+// The following manual tests must be done:
+//   - TestCodecUnderlyingType
+//   - Set fastpathEnabled to false and run tests (to ensure that regular reflection works).
+//     We don't want to use a variable there so that code is ellided.
+
+import (
+	"bytes"
+	"encoding/gob"
+	"flag"
+	"fmt"
+	"io/ioutil"
+	"math"
+	"net"
+	"net/rpc"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"reflect"
+	"runtime"
+	"strconv"
+	"sync/atomic"
+	"testing"
+	"time"
+)
+
+func init() {
+	testInitFlags()
+	testPreInitFns = append(testPreInitFns, testInit)
+}
+
+type testVerifyArg int
+
+const (
+	testVerifyMapTypeSame testVerifyArg = iota
+	testVerifyMapTypeStrIntf
+	testVerifyMapTypeIntfIntf
+	// testVerifySliceIntf
+	testVerifyForPython
+)
+
+const testSkipRPCTests = false
+
+var (
+	testVerbose        bool
+	testInitDebug      bool
+	testUseIoEncDec    bool
+	testStructToArray  bool
+	testCanonical      bool
+	testWriteNoSymbols bool
+	testSkipIntf       bool
+
+	skipVerifyVal interface{} = &(struct{}{})
+
+	testMapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil))
+
+	// For Go Time, do not use a descriptive timezone.
+	// It's unnecessary, and makes it harder to do a reflect.DeepEqual.
+	// The Offset already tells what the offset should be, if not on UTC and unknown zone name.
+	timeLoc        = time.FixedZone("", -8*60*60) // UTC-08:00 //time.UTC-8
+	timeToCompare1 = time.Date(2012, 2, 2, 2, 2, 2, 2000, timeLoc).UTC()
+	timeToCompare2 = time.Date(1900, 2, 2, 2, 2, 2, 2000, timeLoc).UTC()
+	timeToCompare3 = time.Unix(0, 270).UTC() // use value that must be encoded as uint64 for nanoseconds (for cbor/msgpack comparison)
+	//timeToCompare4 = time.Time{}.UTC() // does not work well with simple cbor time encoding (overflow)
+	timeToCompare4 = time.Unix(-2013855848, 4223).UTC()
+
+	table              []interface{} // main items we encode
+	tableVerify        []interface{} // we verify encoded things against this after decode
+	tableTestNilVerify []interface{} // for nil interface, use this to verify (rules are different)
+	tablePythonVerify  []interface{} // for verifying for python, since Python sometimes
+	// will encode a float32 as float64, or large int as uint
+	testRpcInt = new(TestRpcInt)
+)
+
+func testInitFlags() {
+	// delete(testDecOpts.ExtFuncs, timeTyp)
+	flag.BoolVar(&testVerbose, "tv", false, "Test Verbose")
+	flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug")
+	flag.BoolVar(&testUseIoEncDec, "ti", false, "Use IO Reader/Writer for Marshal/Unmarshal")
+	flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option")
+	flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option")
+	flag.BoolVar(&testCanonical, "tc", false, "Set Canonical option")
+	flag.BoolVar(&testSkipIntf, "tf", false, "Skip Interfaces")
+}
+
+type TestABC struct {
+	A, B, C string
+}
+
+type TestRpcInt struct {
+	i int
+}
+
+func (r *TestRpcInt) Update(n int, res *int) error      { r.i = n; *res = r.i; return nil }
+func (r *TestRpcInt) Square(ignore int, res *int) error { *res = r.i * r.i; return nil }
+func (r *TestRpcInt) Mult(n int, res *int) error        { *res = r.i * n; return nil }
+func (r *TestRpcInt) EchoStruct(arg TestABC, res *string) error {
+	*res = fmt.Sprintf("%#v", arg)
+	return nil
+}
+func (r *TestRpcInt) Echo123(args []string, res *string) error {
+	*res = fmt.Sprintf("%#v", args)
+	return nil
+}
+
+type testUnixNanoTimeExt struct{}
+
+func (x testUnixNanoTimeExt) WriteExt(interface{}) []byte { panic("unsupported") }
+func (x testUnixNanoTimeExt) ReadExt(interface{}, []byte) { panic("unsupported") }
+func (x testUnixNanoTimeExt) ConvertExt(v interface{}) interface{} {
+	switch v2 := v.(type) {
+	case time.Time:
+		return v2.UTC().UnixNano()
+	case *time.Time:
+		return v2.UTC().UnixNano()
+	default:
+		panic(fmt.Sprintf("unsupported format for time conversion: expecting time.Time; got %T", v))
+	}
+}
+func (x testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) {
+	// fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v\n", v)
+	tt := dest.(*time.Time)
+	switch v2 := v.(type) {
+	case int64:
+		*tt = time.Unix(0, v2).UTC()
+	case uint64:
+		*tt = time.Unix(0, int64(v2)).UTC()
+	//case float64:
+	//case string:
+	default:
+		panic(fmt.Sprintf("unsupported format for time conversion: expecting int64/uint64; got %T", v))
+	}
+	// fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v, tt: %#v\n", v, tt)
+}
+
+func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) {
+	//for python msgpack,
+	//  - all positive integers are unsigned 64-bit ints
+	//  - all floats are float64
+	switch iv := v.(type) {
+	case int8:
+		if iv >= 0 {
+			v2 = uint64(iv)
+		} else {
+			v2 = int64(iv)
+		}
+	case int16:
+		if iv >= 0 {
+			v2 = uint64(iv)
+		} else {
+			v2 = int64(iv)
+		}
+	case int32:
+		if iv >= 0 {
+			v2 = uint64(iv)
+		} else {
+			v2 = int64(iv)
+		}
+	case int64:
+		if iv >= 0 {
+			v2 = uint64(iv)
+		} else {
+			v2 = int64(iv)
+		}
+	case uint8:
+		v2 = uint64(iv)
+	case uint16:
+		v2 = uint64(iv)
+	case uint32:
+		v2 = uint64(iv)
+	case uint64:
+		v2 = uint64(iv)
+	case float32:
+		v2 = float64(iv)
+	case float64:
+		v2 = float64(iv)
+	case []interface{}:
+		m2 := make([]interface{}, len(iv))
+		for j, vj := range iv {
+			m2[j] = testVerifyVal(vj, arg)
+		}
+		v2 = m2
+	case map[string]bool:
+		switch arg {
+		case testVerifyMapTypeSame:
+			m2 := make(map[string]bool)
+			for kj, kv := range iv {
+				m2[kj] = kv
+			}
+			v2 = m2
+		case testVerifyMapTypeStrIntf, testVerifyForPython:
+			m2 := make(map[string]interface{})
+			for kj, kv := range iv {
+				m2[kj] = kv
+			}
+			v2 = m2
+		case testVerifyMapTypeIntfIntf:
+			m2 := make(map[interface{}]interface{})
+			for kj, kv := range iv {
+				m2[kj] = kv
+			}
+			v2 = m2
+		}
+	case map[string]interface{}:
+		switch arg {
+		case testVerifyMapTypeSame:
+			m2 := make(map[string]interface{})
+			for kj, kv := range iv {
+				m2[kj] = testVerifyVal(kv, arg)
+			}
+			v2 = m2
+		case testVerifyMapTypeStrIntf, testVerifyForPython:
+			m2 := make(map[string]interface{})
+			for kj, kv := range iv {
+				m2[kj] = testVerifyVal(kv, arg)
+			}
+			v2 = m2
+		case testVerifyMapTypeIntfIntf:
+			m2 := make(map[interface{}]interface{})
+			for kj, kv := range iv {
+				m2[kj] = testVerifyVal(kv, arg)
+			}
+			v2 = m2
+		}
+	case map[interface{}]interface{}:
+		m2 := make(map[interface{}]interface{})
+		for kj, kv := range iv {
+			m2[testVerifyVal(kj, arg)] = testVerifyVal(kv, arg)
+		}
+		v2 = m2
+	case time.Time:
+		switch arg {
+		case testVerifyForPython:
+			if iv2 := iv.UnixNano(); iv2 >= 0 {
+				v2 = uint64(iv2)
+			} else {
+				v2 = int64(iv2)
+			}
+		default:
+			v2 = v
+		}
+	default:
+		v2 = v
+	}
+	return
+}
+
+func testInit() {
+	gob.Register(new(TestStruc))
+	if testInitDebug {
+		ts0 := newTestStruc(2, false, !testSkipIntf, false)
+		fmt.Printf("====> depth: %v, ts: %#v\n", 2, ts0)
+	}
+
+	testJsonH.Canonical = testCanonical
+	testCborH.Canonical = testCanonical
+	testSimpleH.Canonical = testCanonical
+	testBincH.Canonical = testCanonical
+	testMsgpackH.Canonical = testCanonical
+
+	testJsonH.StructToArray = testStructToArray
+	testCborH.StructToArray = testStructToArray
+	testSimpleH.StructToArray = testStructToArray
+	testBincH.StructToArray = testStructToArray
+	testMsgpackH.StructToArray = testStructToArray
+
+	testMsgpackH.RawToString = true
+
+	if testWriteNoSymbols {
+		testBincH.AsSymbols = AsSymbolNone
+	} else {
+		testBincH.AsSymbols = AsSymbolAll
+	}
+
+	// testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt)
+	// testMsgpackH.AddExt(timeTyp, 1, testMsgpackH.TimeEncodeExt, testMsgpackH.TimeDecodeExt)
+	timeEncExt := func(rv reflect.Value) (bs []byte, err error) {
+		switch v2 := rv.Interface().(type) {
+		case time.Time:
+			bs = encodeTime(v2)
+		case *time.Time:
+			bs = encodeTime(*v2)
+		default:
+			err = fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)
+		}
+		return
+	}
+	timeDecExt := func(rv reflect.Value, bs []byte) (err error) {
+		tt, err := decodeTime(bs)
+		if err == nil {
+			*(rv.Interface().(*time.Time)) = tt
+		}
+		return
+	}
+
+	// add extensions for msgpack, simple for time.Time, so we can encode/decode same way.
+	testMsgpackH.AddExt(timeTyp, 1, timeEncExt, timeDecExt)
+	testSimpleH.AddExt(timeTyp, 1, timeEncExt, timeDecExt)
+	testCborH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{})
+	testJsonH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{})
+
+	primitives := []interface{}{
+		int8(-8),
+		int16(-1616),
+		int32(-32323232),
+		int64(-6464646464646464),
+		uint8(192),
+		uint16(1616),
+		uint32(32323232),
+		uint64(6464646464646464),
+		byte(192),
+		float32(-3232.0),
+		float64(-6464646464.0),
+		float32(3232.0),
+		float64(6464646464.0),
+		false,
+		true,
+		nil,
+		"someday",
+		"",
+		"bytestring",
+		timeToCompare1,
+		timeToCompare2,
+		timeToCompare3,
+		timeToCompare4,
+	}
+	mapsAndStrucs := []interface{}{
+		map[string]bool{
+			"true":  true,
+			"false": false,
+		},
+		map[string]interface{}{
+			"true":         "True",
+			"false":        false,
+			"uint16(1616)": uint16(1616),
+		},
+		//add a complex combo map in here. (map has list which has map)
+		//note that after the first thing, everything else should be generic.
+		map[string]interface{}{
+			"list": []interface{}{
+				int16(1616),
+				int32(32323232),
+				true,
+				float32(-3232.0),
+				map[string]interface{}{
+					"TRUE":  true,
+					"FALSE": false,
+				},
+				[]interface{}{true, false},
+			},
+			"int32":        int32(32323232),
+			"bool":         true,
+			"LONG STRING":  "123456789012345678901234567890123456789012345678901234567890",
+			"SHORT STRING": "1234567890",
+		},
+		map[interface{}]interface{}{
+			true:       "true",
+			uint8(138): false,
+			"false":    uint8(200),
+		},
+		newTestStruc(0, false, !testSkipIntf, false),
+	}
+
+	table = []interface{}{}
+	table = append(table, primitives...)    //0-19 are primitives
+	table = append(table, primitives)       //20 is a list of primitives
+	table = append(table, mapsAndStrucs...) //21-24 are maps. 25 is a *struct
+
+	tableVerify = make([]interface{}, len(table))
+	tableTestNilVerify = make([]interface{}, len(table))
+	tablePythonVerify = make([]interface{}, len(table))
+
+	lp := len(primitives)
+	av := tableVerify
+	for i, v := range table {
+		if i == lp+3 {
+			av[i] = skipVerifyVal
+			continue
+		}
+		//av[i] = testVerifyVal(v, testVerifyMapTypeSame)
+		switch v.(type) {
+		case []interface{}:
+			av[i] = testVerifyVal(v, testVerifyMapTypeSame)
+		case map[string]interface{}:
+			av[i] = testVerifyVal(v, testVerifyMapTypeSame)
+		case map[interface{}]interface{}:
+			av[i] = testVerifyVal(v, testVerifyMapTypeSame)
+		default:
+			av[i] = v
+		}
+	}
+
+	av = tableTestNilVerify
+	for i, v := range table {
+		if i > lp+3 {
+			av[i] = skipVerifyVal
+			continue
+		}
+		av[i] = testVerifyVal(v, testVerifyMapTypeStrIntf)
+	}
+
+	av = tablePythonVerify
+	for i, v := range table {
+		if i > lp+3 {
+			av[i] = skipVerifyVal
+			continue
+		}
+		av[i] = testVerifyVal(v, testVerifyForPython)
+	}
+
+	tablePythonVerify = tablePythonVerify[:24]
+}
+
+func testUnmarshal(v interface{}, data []byte, h Handle) (err error) {
+	if testUseIoEncDec {
+		NewDecoder(bytes.NewBuffer(data), h).MustDecode(v)
+	} else {
+		NewDecoderBytes(data, h).MustDecode(v)
+	}
+	return
+}
+
+func testMarshal(v interface{}, h Handle) (bs []byte, err error) {
+	if testUseIoEncDec {
+		var buf bytes.Buffer
+		NewEncoder(&buf, h).MustEncode(v)
+		bs = buf.Bytes()
+		return
+	}
+	NewEncoderBytes(&bs, h).MustEncode(v)
+	return
+}
+
+func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []byte, err error) {
+	if bs, err = testMarshal(v, h); err != nil {
+		logT(t, "Error encoding %s: %v, Err: %v", name, v, err)
+		t.FailNow()
+	}
+	return
+}
+
+func testUnmarshalErr(v interface{}, data []byte, h Handle, t *testing.T, name string) (err error) {
+	if err = testUnmarshal(v, data, h); err != nil {
+		logT(t, "Error Decoding into %s: %v, Err: %v", name, v, err)
+		t.FailNow()
+	}
+	return
+}
+
+// doTestCodecTableOne allows us test for different variations based on arguments passed.
+func doTestCodecTableOne(t *testing.T, testNil bool, h Handle,
+	vs []interface{}, vsVerify []interface{}) {
+	//if testNil, then just test for when a pointer to a nil interface{} is passed. It should work.
+	//Current setup allows us test (at least manually) the nil interface or typed interface.
+	logT(t, "================ TestNil: %v ================\n", testNil)
+	for i, v0 := range vs {
+		logT(t, "..............................................")
+		logT(t, "         Testing: #%d:, %T, %#v\n", i, v0, v0)
+		b0, err := testMarshalErr(v0, h, t, "v0")
+		if err != nil {
+			continue
+		}
+		if h.isBinary() {
+			logT(t, "         Encoded bytes: len: %v, %v\n", len(b0), b0)
+		} else {
+			logT(t, "         Encoded string: len: %v, %v\n", len(string(b0)), string(b0))
+			// println("########### encoded string: " + string(b0))
+		}
+		var v1 interface{}
+
+		if testNil {
+			err = testUnmarshal(&v1, b0, h)
+		} else {
+			if v0 != nil {
+				v0rt := reflect.TypeOf(v0) // ptr
+				rv1 := reflect.New(v0rt)
+				err = testUnmarshal(rv1.Interface(), b0, h)
+				v1 = rv1.Elem().Interface()
+				// v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface()
+			}
+		}
+
+		logT(t, "         v1 returned: %T, %#v", v1, v1)
+		// if v1 != nil {
+		//	logT(t, "         v1 returned: %T, %#v", v1, v1)
+		//	//we always indirect, because ptr to typed value may be passed (if not testNil)
+		//	v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface()
+		// }
+		if err != nil {
+			logT(t, "-------- Error: %v. Partial return: %v", err, v1)
+			failT(t)
+			continue
+		}
+		v0check := vsVerify[i]
+		if v0check == skipVerifyVal {
+			logT(t, "        Nil Check skipped: Decoded: %T, %#v\n", v1, v1)
+			continue
+		}
+
+		if err = deepEqual(v0check, v1); err == nil {
+			logT(t, "++++++++ Before and After marshal matched\n")
+		} else {
+			// logT(t, "-------- Before and After marshal do not match: Error: %v"+
+			// 	" ====> GOLDEN: (%T) %#v, DECODED: (%T) %#v\n", err, v0check, v0check, v1, v1)
+			logT(t, "-------- Before and After marshal do not match: Error: %v", err)
+			logT(t, "    ....... GOLDEN:  (%T) %#v", v0check, v0check)
+			logT(t, "    ....... DECODED: (%T) %#v", v1, v1)
+			failT(t)
+		}
+	}
+}
+
+func testCodecTableOne(t *testing.T, h Handle) {
+	testOnce.Do(testInitAll)
+	// func TestMsgpackAllExperimental(t *testing.T) {
+	// dopts := testDecOpts(nil, nil, false, true, true),
+
+	idxTime, numPrim, numMap := 19, 23, 4
+	//println("#################")
+	switch v := h.(type) {
+	case *MsgpackHandle:
+		var oldWriteExt, oldRawToString bool
+		oldWriteExt, v.WriteExt = v.WriteExt, true
+		oldRawToString, v.RawToString = v.RawToString, true
+		doTestCodecTableOne(t, false, h, table, tableVerify)
+		v.WriteExt, v.RawToString = oldWriteExt, oldRawToString
+	case *JsonHandle:
+		//skip []interface{} containing time.Time, as it encodes as a number, but cannot decode back to time.Time.
+		//As there is no real support for extension tags in json, this must be skipped.
+		doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim])
+		doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:])
+	default:
+		doTestCodecTableOne(t, false, h, table, tableVerify)
+	}
+	// func TestMsgpackAll(t *testing.T) {
+
+	// //skip []interface{} containing time.Time
+	// doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim])
+	// doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:])
+	// func TestMsgpackNilStringMap(t *testing.T) {
+	var oldMapType reflect.Type
+	v := h.getBasicHandle()
+
+	oldMapType, v.MapType = v.MapType, testMapStrIntfTyp
+
+	//skip time.Time, []interface{} containing time.Time, last map, and newStruc
+	doTestCodecTableOne(t, true, h, table[:idxTime], tableTestNilVerify[:idxTime])
+	doTestCodecTableOne(t, true, h, table[numPrim+1:numPrim+numMap], tableTestNilVerify[numPrim+1:numPrim+numMap])
+
+	v.MapType = oldMapType
+
+	// func TestMsgpackNilIntf(t *testing.T) {
+
+	//do newTestStruc and last element of map
+	doTestCodecTableOne(t, true, h, table[numPrim+numMap:], tableTestNilVerify[numPrim+numMap:])
+	//TODO? What is this one?
+	//doTestCodecTableOne(t, true, h, table[17:18], tableTestNilVerify[17:18])
+}
+
+func testCodecMiscOne(t *testing.T, h Handle) {
+	testOnce.Do(testInitAll)
+	b, err := testMarshalErr(32, h, t, "32")
+	// Cannot do this nil one, because faster type assertion decoding will panic
+	// var i *int32
+	// if err = testUnmarshal(b, i, nil); err == nil {
+	// 	logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr")
+	// 	t.FailNow()
+	// }
+	var i2 int32 = 0
+	err = testUnmarshalErr(&i2, b, h, t, "int32-ptr")
+	if i2 != int32(32) {
+		logT(t, "------- didn't unmarshal to 32: Received: %d", i2)
+		t.FailNow()
+	}
+
+	// func TestMsgpackDecodePtr(t *testing.T) {
+	ts := newTestStruc(0, false, !testSkipIntf, false)
+	b, err = testMarshalErr(ts, h, t, "pointer-to-struct")
+	if len(b) < 40 {
+		logT(t, "------- Size must be > 40. Size: %d", len(b))
+		t.FailNow()
+	}
+	if h.isBinary() {
+		logT(t, "------- b: %v", b)
+	} else {
+		logT(t, "------- b: %s", b)
+	}
+	ts2 := new(TestStruc)
+	err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct")
+	if ts2.I64 != math.MaxInt64*2/3 {
+		logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64)
+		t.FailNow()
+	}
+
+	// func TestMsgpackIntfDecode(t *testing.T) {
+	m := map[string]int{"A": 2, "B": 3}
+	p := []interface{}{m}
+	bs, err := testMarshalErr(p, h, t, "p")
+
+	m2 := map[string]int{}
+	p2 := []interface{}{m2}
+	err = testUnmarshalErr(&p2, bs, h, t, "&p2")
+
+	if m2["A"] != 2 || m2["B"] != 3 {
+		logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2)
+		t.FailNow()
+	}
+	// log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2)
+	checkEqualT(t, p, p2, "p=p2")
+	checkEqualT(t, m, m2, "m=m2")
+	if err = deepEqual(p, p2); err == nil {
+		logT(t, "p and p2 match")
+	} else {
+		logT(t, "Not Equal: %v. p: %v, p2: %v", err, p, p2)
+		t.FailNow()
+	}
+	if err = deepEqual(m, m2); err == nil {
+		logT(t, "m and m2 match")
+	} else {
+		logT(t, "Not Equal: %v. m: %v, m2: %v", err, m, m2)
+		t.FailNow()
+	}
+
+	// func TestMsgpackDecodeStructSubset(t *testing.T) {
+	// test that we can decode a subset of the stream
+	mm := map[string]interface{}{"A": 5, "B": 99, "C": 333}
+	bs, err = testMarshalErr(mm, h, t, "mm")
+	type ttt struct {
+		A uint8
+		C int32
+	}
+	var t2 ttt
+	testUnmarshalErr(&t2, bs, h, t, "t2")
+	t3 := ttt{5, 333}
+	checkEqualT(t, t2, t3, "t2=t3")
+
+	// println(">>>>>")
+	// test simple arrays, non-addressable arrays, slices
+	type tarr struct {
+		A int64
+		B [3]int64
+		C []byte
+		D [3]byte
+	}
+	var tarr0 = tarr{1, [3]int64{2, 3, 4}, []byte{4, 5, 6}, [3]byte{7, 8, 9}}
+	// test both pointer and non-pointer (value)
+	for _, tarr1 := range []interface{}{tarr0, &tarr0} {
+		bs, err = testMarshalErr(tarr1, h, t, "tarr1")
+		var tarr2 tarr
+		testUnmarshalErr(&tarr2, bs, h, t, "tarr2")
+		checkEqualT(t, tarr0, tarr2, "tarr0=tarr2")
+		// fmt.Printf(">>>> err: %v. tarr1: %v, tarr2: %v\n", err, tarr0, tarr2)
+	}
+
+	// test byte array, even if empty (msgpack only)
+	if h == testMsgpackH {
+		type ystruct struct {
+			Anarray []byte
+		}
+		var ya = ystruct{}
+		testUnmarshalErr(&ya, []byte{0x91, 0x90}, h, t, "ya")
+	}
+}
+
+func testCodecEmbeddedPointer(t *testing.T, h Handle) {
+	testOnce.Do(testInitAll)
+	type Z int
+	type A struct {
+		AnInt int
+	}
+	type B struct {
+		*Z
+		*A
+		MoreInt int
+	}
+	var z Z = 4
+	x1 := &B{&z, &A{5}, 6}
+	bs, err := testMarshalErr(x1, h, t, "x1")
+	// fmt.Printf("buf: len(%v): %x\n", buf.Len(), buf.Bytes())
+	var x2 = new(B)
+	err = testUnmarshalErr(x2, bs, h, t, "x2")
+	err = checkEqualT(t, x1, x2, "x1=x2")
+	_ = err
+}
+
+func testCodecUnderlyingType(t *testing.T, h Handle) {
+	testOnce.Do(testInitAll)
+	// Manual Test.
+	// Run by hand, with accompanying print statements in fast-path.go
+	// to ensure that the fast functions are called.
+	type T1 map[string]string
+	v := T1{"1": "1s", "2": "2s"}
+	var bs []byte
+	var err error
+	NewEncoderBytes(&bs, h).MustEncode(v)
+	if err != nil {
+		logT(t, "Error during encode: %v", err)
+		failT(t)
+	}
+	var v2 T1
+	NewDecoderBytes(bs, h).MustDecode(&v2)
+	if err != nil {
+		logT(t, "Error during decode: %v", err)
+		failT(t)
+	}
+}
+
+func testCodecChan(t *testing.T, h Handle) {
+	// - send a slice []*int64 (sl1) into an chan (ch1) with cap > len(s1)
+	// - encode ch1 as a stream array
+	// - decode a chan (ch2), with cap > len(s1) from the stream array
+	// - receive from ch2 into slice sl2
+	// - compare sl1 and sl2
+	// - do this for codecs: json, cbor (covers all types)
+	sl1 := make([]*int64, 4)
+	for i := range sl1 {
+		var j int64 = int64(i)
+		sl1[i] = &j
+	}
+	ch1 := make(chan *int64, 4)
+	for _, j := range sl1 {
+		ch1 <- j
+	}
+	var bs []byte
+	NewEncoderBytes(&bs, h).MustEncode(ch1)
+	// if !h.isBinary() {
+	// 	fmt.Printf("before: len(ch1): %v, bs: %s\n", len(ch1), bs)
+	// }
+	// var ch2 chan *int64 // this will block if json, etc.
+	ch2 := make(chan *int64, 8)
+	NewDecoderBytes(bs, h).MustDecode(&ch2)
+	// logT(t, "Len(ch2): %v", len(ch2))
+	// fmt.Printf("after:  len(ch2): %v, ch2: %v\n", len(ch2), ch2)
+	close(ch2)
+	var sl2 []*int64
+	for j := range ch2 {
+		sl2 = append(sl2, j)
+	}
+	if err := deepEqual(sl1, sl2); err != nil {
+		logT(t, "Not Match: %v; len: %v, %v", err, len(sl1), len(sl2))
+		failT(t)
+	}
+}
+
+func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs time.Duration,
+) (port int) {
+	testOnce.Do(testInitAll)
+	if testSkipRPCTests {
+		return
+	}
+	// rpc needs EOF, which is sent via a panic, and so must be recovered.
+	if !recoverPanicToErr {
+		logT(t, "EXPECTED. set recoverPanicToErr=true, since rpc needs EOF")
+		t.FailNow()
+	}
+	srv := rpc.NewServer()
+	srv.Register(testRpcInt)
+	ln, err := net.Listen("tcp", "127.0.0.1:0")
+	// log("listener: %v", ln.Addr())
+	checkErrT(t, err)
+	port = (ln.Addr().(*net.TCPAddr)).Port
+	// var opts *DecoderOptions
+	// opts := testDecOpts
+	// opts.MapType = mapStrIntfTyp
+	// opts.RawToString = false
+	serverExitChan := make(chan bool, 1)
+	var serverExitFlag uint64 = 0
+	serverFn := func() {
+		for {
+			conn1, err1 := ln.Accept()
+			// if err1 != nil {
+			// 	//fmt.Printf("accept err1: %v\n", err1)
+			// 	continue
+			// }
+			if atomic.LoadUint64(&serverExitFlag) == 1 {
+				serverExitChan <- true
+				conn1.Close()
+				return // exit serverFn goroutine
+			}
+			if err1 == nil {
+				var sc rpc.ServerCodec = rr.ServerCodec(conn1, h)
+				srv.ServeCodec(sc)
+			}
+		}
+	}
+
+	clientFn := func(cc rpc.ClientCodec) {
+		cl := rpc.NewClientWithCodec(cc)
+		defer cl.Close()
+		//	defer func() { println("##### client closing"); cl.Close() }()
+		var up, sq, mult int
+		var rstr string
+		// log("Calling client")
+		checkErrT(t, cl.Call("TestRpcInt.Update", 5, &up))
+		// log("Called TestRpcInt.Update")
+		checkEqualT(t, testRpcInt.i, 5, "testRpcInt.i=5")
+		checkEqualT(t, up, 5, "up=5")
+		checkErrT(t, cl.Call("TestRpcInt.Square", 1, &sq))
+		checkEqualT(t, sq, 25, "sq=25")
+		checkErrT(t, cl.Call("TestRpcInt.Mult", 20, &mult))
+		checkEqualT(t, mult, 100, "mult=100")
+		checkErrT(t, cl.Call("TestRpcInt.EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr))
+		checkEqualT(t, rstr, fmt.Sprintf("%#v", TestABC{"Aa", "Bb", "Cc"}), "rstr=")
+		checkErrT(t, cl.Call("TestRpcInt.Echo123", []string{"A1", "B2", "C3"}, &rstr))
+		checkEqualT(t, rstr, fmt.Sprintf("%#v", []string{"A1", "B2", "C3"}), "rstr=")
+	}
+
+	connFn := func() (bs net.Conn) {
+		// log("calling f1")
+		bs, err2 := net.Dial(ln.Addr().Network(), ln.Addr().String())
+		//fmt.Printf("f1. bs: %v, err2: %v\n", bs, err2)
+		checkErrT(t, err2)
+		return
+	}
+
+	exitFn := func() {
+		atomic.StoreUint64(&serverExitFlag, 1)
+		bs := connFn()
+		<-serverExitChan
+		bs.Close()
+		// serverExitChan <- true
+	}
+
+	go serverFn()
+	runtime.Gosched()
+	//time.Sleep(100 * time.Millisecond)
+	if exitSleepMs == 0 {
+		defer ln.Close()
+		defer exitFn()
+	}
+	if doRequest {
+		bs := connFn()
+		cc := rr.ClientCodec(bs, h)
+		clientFn(cc)
+	}
+	if exitSleepMs != 0 {
+		go func() {
+			defer ln.Close()
+			time.Sleep(exitSleepMs)
+			exitFn()
+		}()
+	}
+	return
+}
+
+// Comprehensive testing that generates data encoded from python handle (cbor, msgpack),
+// and validates that our code can read and write it out accordingly.
+// We keep this unexported here, and put actual test in ext_dep_test.go.
+// This way, it can be excluded by excluding file completely.
+func doTestPythonGenStreams(t *testing.T, name string, h Handle) {
+	logT(t, "TestPythonGenStreams-%v", name)
+	tmpdir, err := ioutil.TempDir("", "golang-"+name+"-test")
+	if err != nil {
+		logT(t, "-------- Unable to create temp directory\n")
+		t.FailNow()
+	}
+	defer os.RemoveAll(tmpdir)
+	logT(t, "tmpdir: %v", tmpdir)
+	cmd := exec.Command("python", "test.py", "testdata", tmpdir)
+	//cmd.Stdin = strings.NewReader("some input")
+	//cmd.Stdout = &out
+	var cmdout []byte
+	if cmdout, err = cmd.CombinedOutput(); err != nil {
+		logT(t, "-------- Error running test.py testdata. Err: %v", err)
+		logT(t, "         %v", string(cmdout))
+		t.FailNow()
+	}
+
+	bh := h.getBasicHandle()
+
+	oldMapType := bh.MapType
+	for i, v := range tablePythonVerify {
+		// if v == uint64(0) && h == testMsgpackH {
+		// 	v = int64(0)
+		// }
+		bh.MapType = oldMapType
+		//load up the golden file based on number
+		//decode it
+		//compare to in-mem object
+		//encode it again
+		//compare to output stream
+		logT(t, "..............................................")
+		logT(t, "         Testing: #%d: %T, %#v\n", i, v, v)
+		var bss []byte
+		bss, err = ioutil.ReadFile(filepath.Join(tmpdir, strconv.Itoa(i)+"."+name+".golden"))
+		if err != nil {
+			logT(t, "-------- Error reading golden file: %d. Err: %v", i, err)
+			failT(t)
+			continue
+		}
+		bh.MapType = testMapStrIntfTyp
+
+		var v1 interface{}
+		if err = testUnmarshal(&v1, bss, h); err != nil {
+			logT(t, "-------- Error decoding stream: %d: Err: %v", i, err)
+			failT(t)
+			continue
+		}
+		if v == skipVerifyVal {
+			continue
+		}
+		//no need to indirect, because we pass a nil ptr, so we already have the value
+		//if v1 != nil { v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() }
+		if err = deepEqual(v, v1); err == nil {
+			logT(t, "++++++++ Objects match: %T, %v", v, v)
+		} else {
+			logT(t, "-------- Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1)
+			logT(t, "--------   GOLDEN: %#v", v)
+			// logT(t, "--------   DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface())
+			logT(t, "--------   DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface())
+			failT(t)
+		}
+		bsb, err := testMarshal(v1, h)
+		if err != nil {
+			logT(t, "Error encoding to stream: %d: Err: %v", i, err)
+			failT(t)
+			continue
+		}
+		if err = deepEqual(bsb, bss); err == nil {
+			logT(t, "++++++++ Bytes match")
+		} else {
+			logT(t, "???????? Bytes do not match. %v.", err)
+			xs := "--------"
+			if reflect.ValueOf(v).Kind() == reflect.Map {
+				xs = "        "
+				logT(t, "%s It's a map. Ok that they don't match (dependent on ordering).", xs)
+			} else {
+				logT(t, "%s It's not a map. They should match.", xs)
+				failT(t)
+			}
+			logT(t, "%s   FROM_FILE: %4d] %v", xs, len(bss), bss)
+			logT(t, "%s     ENCODED: %4d] %v", xs, len(bsb), bsb)
+		}
+	}
+	bh.MapType = oldMapType
+}
+
+// To test MsgpackSpecRpc, we test 3 scenarios:
+//    - Go Client to Go RPC Service (contained within TestMsgpackRpcSpec)
+//    - Go client to Python RPC Service (contained within doTestMsgpackRpcSpecGoClientToPythonSvc)
+//    - Python Client to Go RPC Service (contained within doTestMsgpackRpcSpecPythonClientToGoSvc)
+//
+// This allows us test the different calling conventions
+//    - Go Service requires only one argument
+//    - Python Service allows multiple arguments
+
+func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) {
+	if testSkipRPCTests {
+		return
+	}
+	openPort := "6789"
+	cmd := exec.Command("python", "test.py", "rpc-server", openPort, "2")
+	checkErrT(t, cmd.Start())
+	time.Sleep(100 * time.Millisecond) // time for python rpc server to start
+	bs, err2 := net.Dial("tcp", ":"+openPort)
+	checkErrT(t, err2)
+	cc := MsgpackSpecRpc.ClientCodec(bs, testMsgpackH)
+	cl := rpc.NewClientWithCodec(cc)
+	defer cl.Close()
+	var rstr string
+	checkErrT(t, cl.Call("EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr))
+	//checkEqualT(t, rstr, "{'A': 'Aa', 'B': 'Bb', 'C': 'Cc'}")
+	var mArgs MsgpackSpecRpcMultiArgs = []interface{}{"A1", "B2", "C3"}
+	checkErrT(t, cl.Call("Echo123", mArgs, &rstr))
+	checkEqualT(t, rstr, "1:A1 2:B2 3:C3", "rstr=")
+}
+
+func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) {
+	if testSkipRPCTests {
+		return
+	}
+	port := testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, false, 1*time.Second)
+	//time.Sleep(1000 * time.Millisecond)
+	cmd := exec.Command("python", "test.py", "rpc-client-go-service", strconv.Itoa(port))
+	var cmdout []byte
+	var err error
+	if cmdout, err = cmd.CombinedOutput(); err != nil {
+		logT(t, "-------- Error running test.py rpc-client-go-service. Err: %v", err)
+		logT(t, "         %v", string(cmdout))
+		t.FailNow()
+	}
+	checkEqualT(t, string(cmdout),
+		fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestABC{"Aa", "Bb", "Cc"}), "cmdout=")
+}
+
+func TestBincCodecsTable(t *testing.T) {
+	testCodecTableOne(t, testBincH)
+}
+
+func TestBincCodecsMisc(t *testing.T) {
+	testCodecMiscOne(t, testBincH)
+}
+
+func TestBincCodecsEmbeddedPointer(t *testing.T) {
+	testCodecEmbeddedPointer(t, testBincH)
+}
+
+func TestSimpleCodecsTable(t *testing.T) {
+	testCodecTableOne(t, testSimpleH)
+}
+
+func TestSimpleCodecsMisc(t *testing.T) {
+	testCodecMiscOne(t, testSimpleH)
+}
+
+func TestSimpleCodecsEmbeddedPointer(t *testing.T) {
+	testCodecEmbeddedPointer(t, testSimpleH)
+}
+
+func TestMsgpackCodecsTable(t *testing.T) {
+	testCodecTableOne(t, testMsgpackH)
+}
+
+func TestMsgpackCodecsMisc(t *testing.T) {
+	testCodecMiscOne(t, testMsgpackH)
+}
+
+func TestMsgpackCodecsEmbeddedPointer(t *testing.T) {
+	testCodecEmbeddedPointer(t, testMsgpackH)
+}
+
+func TestCborCodecsTable(t *testing.T) {
+	testCodecTableOne(t, testCborH)
+}
+
+func TestCborCodecsMisc(t *testing.T) {
+	testCodecMiscOne(t, testCborH)
+}
+
+func TestCborCodecsEmbeddedPointer(t *testing.T) {
+	testCodecEmbeddedPointer(t, testCborH)
+}
+
+func TestJsonCodecsTable(t *testing.T) {
+	testCodecTableOne(t, testJsonH)
+}
+
+func TestJsonCodecsMisc(t *testing.T) {
+	testCodecMiscOne(t, testJsonH)
+}
+
+func TestJsonCodecsEmbeddedPointer(t *testing.T) {
+	testCodecEmbeddedPointer(t, testJsonH)
+}
+
+func TestJsonCodecChan(t *testing.T) {
+	testCodecChan(t, testJsonH)
+}
+
+func TestCborCodecChan(t *testing.T) {
+	testCodecChan(t, testCborH)
+}
+
+// ----- RPC -----
+
+func TestBincRpcGo(t *testing.T) {
+	testCodecRpcOne(t, GoRpc, testBincH, true, 0)
+}
+
+func TestSimpleRpcGo(t *testing.T) {
+	testCodecRpcOne(t, GoRpc, testSimpleH, true, 0)
+}
+
+func TestMsgpackRpcGo(t *testing.T) {
+	testCodecRpcOne(t, GoRpc, testMsgpackH, true, 0)
+}
+
+func TestCborRpcGo(t *testing.T) {
+	testCodecRpcOne(t, GoRpc, testCborH, true, 0)
+}
+
+func TestJsonRpcGo(t *testing.T) {
+	testCodecRpcOne(t, GoRpc, testJsonH, true, 0)
+}
+
+func TestMsgpackRpcSpec(t *testing.T) {
+	testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, true, 0)
+}
+
+func TestBincUnderlyingType(t *testing.T) {
+	testCodecUnderlyingType(t, testBincH)
+}
+
+// TODO:
+//   Add Tests for:
+//   - decoding empty list/map in stream into a nil slice/map
+//   - binary(M|Unm)arsher support for time.Time (e.g. cbor encoding)
+//   - text(M|Unm)arshaler support for time.Time (e.g. json encoding)
+//   - non fast-path scenarios e.g. map[string]uint16, []customStruct.
+//     Expand cbor to include indefinite length stuff for this non-fast-path types.
+//     This may not be necessary, since we have the manual tests (fastpathEnabled=false) to test/validate with.
+//   - CodecSelfer
+//     Ensure it is called when (en|de)coding interface{} or reflect.Value (2 different codepaths).
+//   - interfaces: textMarshaler, binaryMarshaler, codecSelfer
+//   - struct tags:
+//     on anonymous fields, _struct (all fields), etc
+//   - codecgen of struct containing channels.
+//
+//   Cleanup tests:
+//   - The are brittle in their handling of validation and skipping

+ 36 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md

@@ -0,0 +1,36 @@
+# codecgen tool
+
+Generate is given a list of *.go files to parse, and an output file (fout),
+codecgen will create an output file __file.go__ which
+contains `codec.Selfer` implementations for the named types found
+in the files parsed.
+
+Using codecgen is very straightforward.
+
+**Download and install the tool**
+
+`go get -u github.com/ugorji/go/codec/codecgen`
+
+**Run the tool on your files**
+
+The command line format is:
+
+`codecgen [options] (-o outfile) (infile ...)`
+
+```sh
+% codecgen -?
+Usage of codecgen:
+  -c="github.com/ugorji/go/codec": codec path
+  -o="": out file
+  -r=".*": regex for type name to match
+  -rt="": tags for go run
+  -t="": build tag to put in file
+  -u=false: Use unsafe, e.g. to avoid unnecessary allocation on []byte->string
+  -x=false: keep temp file
+
+% codecgen -o values_codecgen.go values.go values2.go moretypedefs.go
+```
+
+Please see the [blog article](http://ugorji.net/blog/go-codecgen)
+for more information on how to use the tool.
+

+ 271 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go

@@ -0,0 +1,271 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+// codecgen generates codec.Selfer implementations for a set of types.
+package main
+
+import (
+	"bufio"
+	"bytes"
+	"errors"
+	"flag"
+	"fmt"
+	"go/ast"
+	"go/build"
+	"go/parser"
+	"go/token"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"regexp"
+	"strconv"
+	"text/template"
+	"time"
+)
+
+const genFrunMainTmpl = `//+build ignore
+
+package main
+{{ if .Types }}import "{{ .ImportPath }}"{{ end }}
+func main() {
+	{{ $.PackageName }}.CodecGenTempWrite{{ .RandString }}()
+}
+`
+
+// const genFrunPkgTmpl = `//+build codecgen
+const genFrunPkgTmpl = `
+package {{ $.PackageName }}
+
+import (
+	{{ if not .CodecPkgFiles }}{{ .CodecPkgName }} "{{ .CodecImportPath }}"{{ end }}
+{{/*
+	{{ if .Types }}"{{ .ImportPath }}"{{ end }}
+	"io"
+*/}}
+	"os"
+	"reflect"
+	"bytes"
+	"go/format"
+)
+
+{{/* This is not used anymore. Remove it.
+func write(w io.Writer, s string) {
+	if _, err := io.WriteString(w, s); err != nil {
+		panic(err)
+	}
+}
+*/}}
+
+func CodecGenTempWrite{{ .RandString }}() {
+	fout, err := os.Create("{{ .OutFile }}")
+	if err != nil {
+		panic(err)
+	}
+	defer fout.Close()
+	var out bytes.Buffer
+	
+	var typs []reflect.Type 
+{{ range $index, $element := .Types }}
+	var t{{ $index }} {{ . }}
+	typs = append(typs, reflect.TypeOf(t{{ $index }}))
+{{ end }}
+	{{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", {{ .UseUnsafe }}, typs...)
+	bout, err := format.Source(out.Bytes())
+	if err != nil {
+		fout.Write(out.Bytes())
+		panic(err)
+	}
+	fout.Write(bout)
+}
+
+`
+
+// Generate is given a list of *.go files to parse, and an output file (fout).
+//
+// It finds all types T in the files, and it creates 2 tmp files (frun).
+//   - main package file passed to 'go run'
+//   - package level file which calls *genRunner.Selfer to write Selfer impls for each T.
+// We use a package level file so that it can reference unexported types in the package being worked on.
+// Tool then executes: "go run __frun__" which creates fout.
+// fout contains Codec(En|De)codeSelf implementations for every type T.
+//
+func Generate(outfile, buildTag, codecPkgPath string, useUnsafe bool, goRunTag string,
+	regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) {
+	// For each file, grab AST, find each type, and write a call to it.
+	if len(infiles) == 0 {
+		return
+	}
+	if outfile == "" || codecPkgPath == "" {
+		err = errors.New("outfile and codec package path cannot be blank")
+		return
+	}
+	// We have to parse dir for package, before opening the temp file for writing (else ImportDir fails).
+	// Also, ImportDir(...) must take an absolute path.
+	lastdir := filepath.Dir(outfile)
+	absdir, err := filepath.Abs(lastdir)
+	if err != nil {
+		return
+	}
+	pkg, err := build.Default.ImportDir(absdir, build.AllowBinary)
+	if err != nil {
+		return
+	}
+	type tmplT struct {
+		CodecPkgName    string
+		CodecImportPath string
+		ImportPath      string
+		OutFile         string
+		PackageName     string
+		RandString      string
+		BuildTag        string
+		Types           []string
+		CodecPkgFiles   bool
+		UseUnsafe       bool
+	}
+	tv := tmplT{
+		CodecPkgName:    "codec1978",
+		OutFile:         outfile,
+		CodecImportPath: codecPkgPath,
+		BuildTag:        buildTag,
+		UseUnsafe:       useUnsafe,
+		RandString:      strconv.FormatInt(time.Now().UnixNano(), 10),
+	}
+	tv.ImportPath = pkg.ImportPath
+	if tv.ImportPath == tv.CodecImportPath {
+		tv.CodecPkgFiles = true
+		tv.CodecPkgName = "codec"
+	}
+	astfiles := make([]*ast.File, len(infiles))
+	for i, infile := range infiles {
+		if filepath.Dir(infile) != lastdir {
+			err = errors.New("in files must all be in same directory as outfile")
+			return
+		}
+		fset := token.NewFileSet()
+		astfiles[i], err = parser.ParseFile(fset, infile, nil, 0)
+		if err != nil {
+			return
+		}
+		if i == 0 {
+			tv.PackageName = astfiles[i].Name.Name
+			if tv.PackageName == "main" {
+				// codecgen cannot be run on types in the 'main' package.
+				// A temporary 'main' package must be created, and should reference the fully built
+				// package containing the types.
+				// Also, the temporary main package will conflict with the main package which already has a main method.
+				err = errors.New("codecgen cannot be run on types in the 'main' package")
+				return
+			}
+		}
+	}
+
+	for _, f := range astfiles {
+		for _, d := range f.Decls {
+			if gd, ok := d.(*ast.GenDecl); ok {
+				for _, dd := range gd.Specs {
+					if td, ok := dd.(*ast.TypeSpec); ok {
+						// if len(td.Name.Name) == 0 || td.Name.Name[0] > 'Z' || td.Name.Name[0] < 'A' {
+						if len(td.Name.Name) == 0 {
+							continue
+						}
+
+						// only generate for:
+						//   struct: StructType
+						//   primitives (numbers, bool, string): Ident
+						//   map: MapType
+						//   slice, array: ArrayType
+						//   chan: ChanType
+						// do not generate:
+						//   FuncType, InterfaceType, StarExpr (ptr), etc
+						switch td.Type.(type) {
+						case *ast.StructType, *ast.Ident, *ast.MapType, *ast.ArrayType, *ast.ChanType:
+							if regexName.FindStringIndex(td.Name.Name) != nil {
+								tv.Types = append(tv.Types, td.Name.Name)
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	if len(tv.Types) == 0 {
+		return
+	}
+
+	// we cannot use ioutil.TempFile, because we cannot guarantee the file suffix (.go).
+	// Also, we cannot create file in temp directory,
+	// because go run will not work (as it needs to see the types here).
+	// Consequently, create the temp file in the current directory, and remove when done.
+
+	// frun, err = ioutil.TempFile("", "codecgen-")
+	// frunName := filepath.Join(os.TempDir(), "codecgen-"+strconv.FormatInt(time.Now().UnixNano(), 10)+".go")
+
+	frunMainName := "codecgen-main-" + tv.RandString + ".generated.go"
+	frunPkgName := "codecgen-pkg-" + tv.RandString + ".generated.go"
+	if deleteTempFile {
+		defer os.Remove(frunMainName)
+		defer os.Remove(frunPkgName)
+	}
+	// var frunMain, frunPkg *os.File
+	if _, err = gen1(frunMainName, genFrunMainTmpl, &tv); err != nil {
+		return
+	}
+	if _, err = gen1(frunPkgName, genFrunPkgTmpl, &tv); err != nil {
+		return
+	}
+
+	// remove outfile, so "go run ..." will not think that types in outfile already exist.
+	os.Remove(outfile)
+
+	// execute go run frun
+	cmd := exec.Command("go", "run", "-tags="+goRunTag, frunMainName) //, frunPkg.Name())
+	var buf bytes.Buffer
+	cmd.Stdout = &buf
+	cmd.Stderr = &buf
+	if err = cmd.Run(); err != nil {
+		err = fmt.Errorf("error running 'go run %s': %v, console: %s",
+			frunMainName, err, buf.Bytes())
+		return
+	}
+	os.Stdout.Write(buf.Bytes())
+	return
+}
+
+func gen1(frunName, tmplStr string, tv interface{}) (frun *os.File, err error) {
+	os.Remove(frunName)
+	if frun, err = os.Create(frunName); err != nil {
+		return
+	}
+	defer frun.Close()
+
+	t := template.New("")
+	if t, err = t.Parse(tmplStr); err != nil {
+		return
+	}
+	bw := bufio.NewWriter(frun)
+	if err = t.Execute(bw, tv); err != nil {
+		return
+	}
+	if err = bw.Flush(); err != nil {
+		return
+	}
+	return
+}
+
+func main() {
+	o := flag.String("o", "", "out file")
+	c := flag.String("c", genCodecPath, "codec path")
+	t := flag.String("t", "", "build tag to put in file")
+	r := flag.String("r", ".*", "regex for type name to match")
+	rt := flag.String("rt", "", "tags for go run")
+	x := flag.Bool("x", false, "keep temp file")
+	u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string")
+
+	flag.Parse()
+	if err := Generate(*o, *t, *c, *u, *rt,
+		regexp.MustCompile(*r), !*x, flag.Args()...); err != nil {
+		fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err)
+		os.Exit(1)
+	}
+}

+ 3 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go

@@ -0,0 +1,3 @@
+package main
+
+const genCodecPath = "github.com/ugorji/go/codec"

+ 22 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go

@@ -0,0 +1,22 @@
+//+build x,codecgen
+
+package codec
+
+import (
+	"fmt"
+	"testing"
+)
+
+func TestCodecgenJson1(t *testing.T) {
+	const callCodecgenDirect bool = true
+	v := newTestStruc(2, false, !testSkipIntf, false)
+	var bs []byte
+	e := NewEncoderBytes(&bs, testJsonH)
+	if callCodecgenDirect {
+		v.CodecEncodeSelf(e)
+		e.w.atEndOfEncode()
+	} else {
+		e.MustEncode(v)
+	}
+	fmt.Printf("%s\n", bs)
+}

+ 1552 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go

@@ -0,0 +1,1552 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"encoding"
+	"errors"
+	"fmt"
+	"io"
+	"reflect"
+)
+
+// Some tagging information for error messages.
+const (
+	msgBadDesc            = "Unrecognized descriptor byte"
+	msgDecCannotExpandArr = "cannot expand go array from %v to stream length: %v"
+)
+
+var (
+	onlyMapOrArrayCanDecodeIntoStructErr = errors.New("only encoded map or array can be decoded into a struct")
+	cannotDecodeIntoNilErr               = errors.New("cannot decode into nil")
+)
+
+// decReader abstracts the reading source, allowing implementations that can
+// read from an io.Reader or directly off a byte slice with zero-copying.
+type decReader interface {
+	// TODO:
+	//   Add method to get num bytes read.
+	//   This will be used to annotate errors, so user knows at what point the error occurred.
+
+	unreadn1()
+
+	// readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR
+	// just return a view of the []byte being decoded from.
+	// Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control.
+	readx(n int) []byte
+	readb([]byte)
+	readn1() uint8
+	readn1eof() (v uint8, eof bool)
+}
+
+type decReaderByteScanner interface {
+	io.Reader
+	io.ByteScanner
+}
+
+type decDriver interface {
+	// this will check if the next token is a break.
+	CheckBreak() bool
+	TryDecodeAsNil() bool
+	// check if a container type: vt is one of: Bytes, String, Nil, Slice or Map.
+	// if vt param == valueTypeNil, and nil is seen in stream, consume the nil.
+	IsContainerType(vt valueType) bool
+	IsBuiltinType(rt uintptr) bool
+	DecodeBuiltin(rt uintptr, v interface{})
+	//decodeNaked: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types).
+	//for extensions, decodeNaked must completely decode them as a *RawExt.
+	//extensions should also use readx to decode them, for efficiency.
+	//kInterface will extract the detached byte slice if it has to pass it outside its realm.
+	DecodeNaked() (v interface{}, vt valueType, decodeFurther bool)
+	DecodeInt(bitsize uint8) (i int64)
+	DecodeUint(bitsize uint8) (ui uint64)
+	DecodeFloat(chkOverflow32 bool) (f float64)
+	DecodeBool() (b bool)
+	// DecodeString can also decode symbols.
+	// It looks redundant as DecodeBytes is available.
+	// However, some codecs (e.g. binc) support symbols and can
+	// return a pre-stored string value, meaning that it can bypass
+	// the cost of []byte->string conversion.
+	DecodeString() (s string)
+
+	// DecodeBytes may be called directly, without going through reflection.
+	// Consequently, it must be designed to handle possible nil.
+	DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte)
+
+	// decodeExt will decode into a *RawExt or into an extension.
+	DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64)
+	// decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte)
+	ReadMapStart() int
+	ReadArrayStart() int
+	ReadMapEnd()
+	ReadArrayEnd()
+	ReadArrayEntrySeparator()
+	ReadMapEntrySeparator()
+	ReadMapKVSeparator()
+}
+
+type decNoSeparator struct{}
+
+func (_ decNoSeparator) ReadMapEnd()              {}
+func (_ decNoSeparator) ReadArrayEnd()            {}
+func (_ decNoSeparator) ReadArrayEntrySeparator() {}
+func (_ decNoSeparator) ReadMapEntrySeparator()   {}
+func (_ decNoSeparator) ReadMapKVSeparator()      {}
+
+type DecodeOptions struct {
+	// MapType specifies type to use during schema-less decoding of a map in the stream.
+	// If nil, we use map[interface{}]interface{}
+	MapType reflect.Type
+
+	// SliceType specifies type to use during schema-less decoding of an array in the stream.
+	// If nil, we use []interface{}
+	SliceType reflect.Type
+
+	// If ErrorIfNoField, return an error when decoding a map
+	// from a codec stream into a struct, and no matching struct field is found.
+	ErrorIfNoField bool
+
+	// If ErrorIfNoArrayExpand, return an error when decoding a slice/array that cannot be expanded.
+	// For example, the stream contains an array of 8 items, but you are decoding into a [4]T array,
+	// or you are decoding into a slice of length 4 which is non-addressable (and so cannot be set).
+	ErrorIfNoArrayExpand bool
+
+	// If SignedInteger, use the int64 during schema-less decoding of unsigned values (not uint64).
+	SignedInteger bool
+}
+
+// ------------------------------------
+
+// ioDecByteScanner implements Read(), ReadByte(...), UnreadByte(...) methods
+// of io.Reader, io.ByteScanner.
+type ioDecByteScanner struct {
+	r  io.Reader
+	l  byte    // last byte
+	ls byte    // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread
+	b  [1]byte // tiny buffer for reading single bytes
+}
+
+func (z *ioDecByteScanner) Read(p []byte) (n int, err error) {
+	var firstByte bool
+	if z.ls == 1 {
+		z.ls = 2
+		p[0] = z.l
+		if len(p) == 1 {
+			n = 1
+			return
+		}
+		firstByte = true
+		p = p[1:]
+	}
+	n, err = z.r.Read(p)
+	if n > 0 {
+		if err == io.EOF && n == len(p) {
+			err = nil // read was successful, so postpone EOF (till next time)
+		}
+		z.l = p[n-1]
+		z.ls = 2
+	}
+	if firstByte {
+		n++
+	}
+	return
+}
+
+func (z *ioDecByteScanner) ReadByte() (c byte, err error) {
+	n, err := z.Read(z.b[:])
+	if n == 1 {
+		c = z.b[0]
+		if err == io.EOF {
+			err = nil // read was successful, so postpone EOF (till next time)
+		}
+	}
+	return
+}
+
+func (z *ioDecByteScanner) UnreadByte() (err error) {
+	x := z.ls
+	if x == 0 {
+		err = errors.New("cannot unread - nothing has been read")
+	} else if x == 1 {
+		err = errors.New("cannot unread - last byte has not been read")
+	} else if x == 2 {
+		z.ls = 1
+	}
+	return
+}
+
+// ioDecReader is a decReader that reads off an io.Reader
+type ioDecReader struct {
+	br decReaderByteScanner
+	// temp byte array re-used internally for efficiency during read.
+	// shares buffer with Decoder, so we keep size of struct within 8 words.
+	x  *[scratchByteArrayLen]byte
+	bs ioDecByteScanner
+}
+
+func (z *ioDecReader) readx(n int) (bs []byte) {
+	if n <= 0 {
+		return
+	}
+	if n < len(z.x) {
+		bs = z.x[:n]
+	} else {
+		bs = make([]byte, n)
+	}
+	if _, err := io.ReadAtLeast(z.br, bs, n); err != nil {
+		panic(err)
+	}
+	return
+}
+
+func (z *ioDecReader) readb(bs []byte) {
+	if len(bs) == 0 {
+		return
+	}
+	if _, err := io.ReadAtLeast(z.br, bs, len(bs)); err != nil {
+		panic(err)
+	}
+}
+
+func (z *ioDecReader) readn1() (b uint8) {
+	b, err := z.br.ReadByte()
+	if err != nil {
+		panic(err)
+	}
+	return b
+}
+
+func (z *ioDecReader) readn1eof() (b uint8, eof bool) {
+	b, err := z.br.ReadByte()
+	if err == nil {
+	} else if err == io.EOF {
+		eof = true
+	} else {
+		panic(err)
+	}
+	return
+}
+
+func (z *ioDecReader) unreadn1() {
+	if err := z.br.UnreadByte(); err != nil {
+		panic(err)
+	}
+}
+
+// ------------------------------------
+
+var bytesDecReaderCannotUnreadErr = errors.New("cannot unread last byte read")
+
+// bytesDecReader is a decReader that reads off a byte slice with zero copying
+type bytesDecReader struct {
+	b []byte // data
+	c int    // cursor
+	a int    // available
+}
+
+func (z *bytesDecReader) unreadn1() {
+	if z.c == 0 || len(z.b) == 0 {
+		panic(bytesDecReaderCannotUnreadErr)
+	}
+	z.c--
+	z.a++
+	return
+}
+
+func (z *bytesDecReader) readx(n int) (bs []byte) {
+	// slicing from a non-constant start position is more expensive,
+	// as more computation is required to decipher the pointer start position.
+	// However, we do it only once, and it's better than reslicing both z.b and return value.
+
+	if n <= 0 {
+	} else if z.a == 0 {
+		panic(io.EOF)
+	} else if n > z.a {
+		panic(io.ErrUnexpectedEOF)
+	} else {
+		c0 := z.c
+		z.c = c0 + n
+		z.a = z.a - n
+		bs = z.b[c0:z.c]
+	}
+	return
+}
+
+func (z *bytesDecReader) readn1() (v uint8) {
+	if z.a == 0 {
+		panic(io.EOF)
+	}
+	v = z.b[z.c]
+	z.c++
+	z.a--
+	return
+}
+
+func (z *bytesDecReader) readn1eof() (v uint8, eof bool) {
+	if z.a == 0 {
+		eof = true
+		return
+	}
+	v = z.b[z.c]
+	z.c++
+	z.a--
+	return
+}
+
+func (z *bytesDecReader) readb(bs []byte) {
+	copy(bs, z.readx(len(bs)))
+}
+
+// ------------------------------------
+
+type decFnInfoX struct {
+	d     *Decoder
+	ti    *typeInfo
+	xfFn  Ext
+	xfTag uint64
+	seq   seqType
+}
+
+// decFnInfo has methods for handling decoding of a specific type
+// based on some characteristics (builtin, extension, reflect Kind, etc)
+type decFnInfo struct {
+	// use decFnInfo as a value receiver.
+	// keep most of it less-used variables accessible via a pointer (*decFnInfoX).
+	// As sweet spot for value-receiver is 3 words, keep everything except
+	// decDriver (which everyone needs) directly accessible.
+	// ensure decFnInfoX is set for everyone who needs it i.e.
+	// rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath
+
+	dd decDriver
+	*decFnInfoX
+}
+
+// ----------------------------------------
+
+type decFn struct {
+	i decFnInfo
+	f func(decFnInfo, reflect.Value)
+}
+
+func (f decFnInfo) builtin(rv reflect.Value) {
+	f.dd.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface())
+}
+
+func (f decFnInfo) rawExt(rv reflect.Value) {
+	f.dd.DecodeExt(rv.Addr().Interface(), 0, nil)
+}
+
+func (f decFnInfo) ext(rv reflect.Value) {
+	f.dd.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn)
+}
+
+func (f decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) {
+	if indir == -1 {
+		v = rv.Addr().Interface()
+	} else if indir == 0 {
+		v = rv.Interface()
+	} else {
+		for j := int8(0); j < indir; j++ {
+			if rv.IsNil() {
+				rv.Set(reflect.New(rv.Type().Elem()))
+			}
+			rv = rv.Elem()
+		}
+		v = rv.Interface()
+	}
+	return
+}
+
+func (f decFnInfo) selferUnmarshal(rv reflect.Value) {
+	f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d)
+}
+
+func (f decFnInfo) binaryUnmarshal(rv reflect.Value) {
+	bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler)
+	xbs := f.dd.DecodeBytes(nil, false, true)
+	if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil {
+		panic(fnerr)
+	}
+}
+
+func (f decFnInfo) textUnmarshal(rv reflect.Value) {
+	tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler)
+	fnerr := tm.UnmarshalText(f.dd.DecodeBytes(f.d.b[:], true, true))
+	// fnerr := tm.UnmarshalText(f.dd.DecodeStringAsBytes(f.d.b[:]))
+
+	// var fnerr error
+	// if sb, sbok := f.dd.(decDriverStringAsBytes); sbok {
+	// 	fnerr = tm.UnmarshalText(sb.decStringAsBytes(f.d.b[:0]))
+	// } else {
+	// 	fnerr = tm.UnmarshalText([]byte(f.dd.decodeString()))
+	// }
+	if fnerr != nil {
+		panic(fnerr)
+	}
+}
+
+func (f decFnInfo) kErr(rv reflect.Value) {
+	f.d.errorf("no decoding function defined for kind %v", rv.Kind())
+}
+
+func (f decFnInfo) kString(rv reflect.Value) {
+	rv.SetString(f.dd.DecodeString())
+}
+
+func (f decFnInfo) kBool(rv reflect.Value) {
+	rv.SetBool(f.dd.DecodeBool())
+}
+
+func (f decFnInfo) kInt(rv reflect.Value) {
+	rv.SetInt(f.dd.DecodeInt(intBitsize))
+}
+
+func (f decFnInfo) kInt64(rv reflect.Value) {
+	rv.SetInt(f.dd.DecodeInt(64))
+}
+
+func (f decFnInfo) kInt32(rv reflect.Value) {
+	rv.SetInt(f.dd.DecodeInt(32))
+}
+
+func (f decFnInfo) kInt8(rv reflect.Value) {
+	rv.SetInt(f.dd.DecodeInt(8))
+}
+
+func (f decFnInfo) kInt16(rv reflect.Value) {
+	rv.SetInt(f.dd.DecodeInt(16))
+}
+
+func (f decFnInfo) kFloat32(rv reflect.Value) {
+	rv.SetFloat(f.dd.DecodeFloat(true))
+}
+
+func (f decFnInfo) kFloat64(rv reflect.Value) {
+	rv.SetFloat(f.dd.DecodeFloat(false))
+}
+
+func (f decFnInfo) kUint8(rv reflect.Value) {
+	rv.SetUint(f.dd.DecodeUint(8))
+}
+
+func (f decFnInfo) kUint64(rv reflect.Value) {
+	rv.SetUint(f.dd.DecodeUint(64))
+}
+
+func (f decFnInfo) kUint(rv reflect.Value) {
+	rv.SetUint(f.dd.DecodeUint(uintBitsize))
+}
+
+func (f decFnInfo) kUint32(rv reflect.Value) {
+	rv.SetUint(f.dd.DecodeUint(32))
+}
+
+func (f decFnInfo) kUint16(rv reflect.Value) {
+	rv.SetUint(f.dd.DecodeUint(16))
+}
+
+// func (f decFnInfo) kPtr(rv reflect.Value) {
+// 	debugf(">>>>>>> ??? decode kPtr called - shouldn't get called")
+// 	if rv.IsNil() {
+// 		rv.Set(reflect.New(rv.Type().Elem()))
+// 	}
+// 	f.d.decodeValue(rv.Elem())
+// }
+
+// var kIntfCtr uint64
+
+func (f decFnInfo) kInterfaceNaked() (rvn reflect.Value) {
+	// nil interface:
+	// use some hieristics to decode it appropriately
+	// based on the detected next value in the stream.
+	v, vt, decodeFurther := f.dd.DecodeNaked()
+	if vt == valueTypeNil {
+		return
+	}
+	// We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader).
+	if num := f.ti.rt.NumMethod(); num > 0 {
+		f.d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, num)
+		return
+	}
+	var useRvn bool
+	switch vt {
+	case valueTypeMap:
+		if f.d.h.MapType == nil {
+			var m2 map[interface{}]interface{}
+			v = &m2
+		} else {
+			rvn = reflect.New(f.d.h.MapType).Elem()
+			useRvn = true
+		}
+	case valueTypeArray:
+		if f.d.h.SliceType == nil {
+			var m2 []interface{}
+			v = &m2
+		} else {
+			rvn = reflect.New(f.d.h.SliceType).Elem()
+			useRvn = true
+		}
+	case valueTypeExt:
+		re := v.(*RawExt)
+		bfn := f.d.h.getExtForTag(re.Tag)
+		if bfn == nil {
+			re.Data = detachZeroCopyBytes(f.d.bytes, nil, re.Data)
+			rvn = reflect.ValueOf(*re)
+		} else {
+			rvnA := reflect.New(bfn.rt)
+			rvn = rvnA.Elem()
+			if re.Data != nil {
+				bfn.ext.ReadExt(rvnA.Interface(), re.Data)
+			} else {
+				bfn.ext.UpdateExt(rvnA.Interface(), re.Value)
+			}
+		}
+		return
+	}
+	if decodeFurther {
+		if useRvn {
+			f.d.decodeValue(rvn, decFn{})
+		} else if v != nil {
+			// this v is a pointer, so we need to dereference it when done
+			f.d.decode(v)
+			rvn = reflect.ValueOf(v).Elem()
+			useRvn = true
+		}
+	}
+
+	if !useRvn && v != nil {
+		rvn = reflect.ValueOf(v)
+	}
+	return
+}
+
+func (f decFnInfo) kInterface(rv reflect.Value) {
+	// debugf("\t===> kInterface")
+
+	// Note:
+	// A consequence of how kInterface works, is that
+	// if an interface already contains something, we try
+	// to decode into what was there before.
+	// We do not replace with a generic value (as got from decodeNaked).
+
+	if rv.IsNil() {
+		rvn := f.kInterfaceNaked()
+		if rvn.IsValid() {
+			rv.Set(rvn)
+		}
+	} else {
+		rve := rv.Elem()
+		// Note: interface{} is settable, but underlying type may not be.
+		// Consequently, we have to set the reflect.Value directly.
+		// if underlying type is settable (e.g. ptr or interface),
+		// we just decode into it.
+		// Else we create a settable value, decode into it, and set on the interface.
+		if rve.CanSet() {
+			f.d.decodeValue(rve, decFn{})
+		} else {
+			rve2 := reflect.New(rve.Type()).Elem()
+			rve2.Set(rve)
+			f.d.decodeValue(rve2, decFn{})
+			rv.Set(rve2)
+		}
+	}
+}
+
+func (f decFnInfo) kStruct(rv reflect.Value) {
+	fti := f.ti
+	d := f.d
+	if f.dd.IsContainerType(valueTypeMap) {
+		containerLen := f.dd.ReadMapStart()
+		if containerLen == 0 {
+			f.dd.ReadMapEnd()
+			return
+		}
+		tisfi := fti.sfi
+		hasLen := containerLen >= 0
+		if hasLen {
+			for j := 0; j < containerLen; j++ {
+				// rvkencname := f.dd.DecodeString()
+				rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true))
+				// rvksi := ti.getForEncName(rvkencname)
+				if k := fti.indexForEncName(rvkencname); k > -1 {
+					si := tisfi[k]
+					if f.dd.TryDecodeAsNil() {
+						si.setToZeroValue(rv)
+					} else {
+						d.decodeValue(si.field(rv, true), decFn{})
+					}
+				} else {
+					d.structFieldNotFound(-1, rvkencname)
+				}
+			}
+		} else {
+			for j := 0; !f.dd.CheckBreak(); j++ {
+				if j > 0 {
+					f.dd.ReadMapEntrySeparator()
+				}
+				// rvkencname := f.dd.DecodeString()
+				rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true))
+				f.dd.ReadMapKVSeparator()
+				// rvksi := ti.getForEncName(rvkencname)
+				if k := fti.indexForEncName(rvkencname); k > -1 {
+					si := tisfi[k]
+					if f.dd.TryDecodeAsNil() {
+						si.setToZeroValue(rv)
+					} else {
+						d.decodeValue(si.field(rv, true), decFn{})
+					}
+				} else {
+					d.structFieldNotFound(-1, rvkencname)
+				}
+			}
+			f.dd.ReadMapEnd()
+		}
+	} else if f.dd.IsContainerType(valueTypeArray) {
+		containerLen := f.dd.ReadArrayStart()
+		if containerLen == 0 {
+			f.dd.ReadArrayEnd()
+			return
+		}
+		// Not much gain from doing it two ways for array.
+		// Arrays are not used as much for structs.
+		hasLen := containerLen >= 0
+		for j, si := range fti.sfip {
+			if hasLen {
+				if j == containerLen {
+					break
+				}
+			} else if f.dd.CheckBreak() {
+				break
+			}
+			if j > 0 {
+				f.dd.ReadArrayEntrySeparator()
+			}
+			if f.dd.TryDecodeAsNil() {
+				si.setToZeroValue(rv)
+			} else {
+				d.decodeValue(si.field(rv, true), decFn{})
+			}
+			// if si.i != -1 {
+			// 	d.decodeValue(rv.Field(int(si.i)), decFn{})
+			// } else {
+			// 	d.decEmbeddedField(rv, si.is)
+			// }
+		}
+		if containerLen > len(fti.sfip) {
+			// read remaining values and throw away
+			for j := len(fti.sfip); j < containerLen; j++ {
+				if j > 0 {
+					f.dd.ReadArrayEntrySeparator()
+				}
+				d.structFieldNotFound(j, "")
+			}
+		}
+		f.dd.ReadArrayEnd()
+	} else {
+		f.d.error(onlyMapOrArrayCanDecodeIntoStructErr)
+		return
+	}
+}
+
+func (f decFnInfo) kSlice(rv reflect.Value) {
+	// A slice can be set from a map or array in stream.
+	// This way, the order can be kept (as order is lost with map).
+	ti := f.ti
+	d := f.d
+	if f.dd.IsContainerType(valueTypeBytes) || f.dd.IsContainerType(valueTypeString) {
+		if ti.rtid == uint8SliceTypId || ti.rt.Elem().Kind() == reflect.Uint8 {
+			if f.seq == seqTypeChan {
+				bs2 := f.dd.DecodeBytes(nil, false, true)
+				ch := rv.Interface().(chan<- byte)
+				for _, b := range bs2 {
+					ch <- b
+				}
+			} else {
+				rvbs := rv.Bytes()
+				bs2 := f.dd.DecodeBytes(rvbs, false, false)
+				if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) {
+					if rv.CanSet() {
+						rv.SetBytes(bs2)
+					} else {
+						copy(rvbs, bs2)
+					}
+				}
+			}
+			return
+		}
+	}
+
+	// array := f.seq == seqTypeChan
+
+	slh, containerLenS := d.decSliceHelperStart()
+
+	// an array can never return a nil slice. so no need to check f.array here.
+	if rv.IsNil() {
+		// either chan or slice
+		if f.seq == seqTypeSlice {
+			if containerLenS <= 0 {
+				rv.Set(reflect.MakeSlice(ti.rt, 0, 0))
+			} else {
+				rv.Set(reflect.MakeSlice(ti.rt, containerLenS, containerLenS))
+			}
+		} else if f.seq == seqTypeChan {
+			if containerLenS <= 0 {
+				rv.Set(reflect.MakeChan(ti.rt, 0))
+			} else {
+				rv.Set(reflect.MakeChan(ti.rt, containerLenS))
+			}
+		}
+	}
+
+	rvlen := rv.Len()
+	if containerLenS == 0 {
+		if f.seq == seqTypeSlice && rvlen != 0 {
+			rv.SetLen(0)
+		}
+		// slh.End() // f.dd.ReadArrayEnd()
+		return
+	}
+
+	rtelem0 := ti.rt.Elem()
+	rtelem := rtelem0
+	for rtelem.Kind() == reflect.Ptr {
+		rtelem = rtelem.Elem()
+	}
+	fn := d.getDecFn(rtelem, true, true)
+
+	rv0 := rv
+	rvChanged := false
+
+	rvcap := rv.Cap()
+
+	// for j := 0; j < containerLenS; j++ {
+
+	hasLen := containerLenS >= 0
+	if hasLen {
+		if f.seq == seqTypeChan {
+			// handle chan specially:
+			for j := 0; j < containerLenS; j++ {
+				rv0 := reflect.New(rtelem0).Elem()
+				d.decodeValue(rv0, fn)
+				rv.Send(rv0)
+			}
+		} else {
+			numToRead := containerLenS
+			if containerLenS > rvcap {
+				if f.seq == seqTypeArray {
+					d.arrayCannotExpand(rv.Len(), containerLenS)
+					numToRead = rvlen
+				} else {
+					rv = reflect.MakeSlice(ti.rt, containerLenS, containerLenS)
+					if rvlen > 0 && !isMutableKind(ti.rt.Kind()) {
+						rv1 := rv0
+						rv1.SetLen(rvcap)
+						reflect.Copy(rv, rv1)
+					}
+					rvChanged = true
+					rvlen = containerLenS
+				}
+			} else if containerLenS != rvlen {
+				if f.seq == seqTypeSlice {
+					rv.SetLen(containerLenS)
+					rvlen = containerLenS
+				}
+			}
+			j := 0
+			for ; j < numToRead; j++ {
+				d.decodeValue(rv.Index(j), fn)
+			}
+			if f.seq == seqTypeArray {
+				for ; j < containerLenS; j++ {
+					d.swallow()
+				}
+			}
+		}
+	} else {
+		for j := 0; !f.dd.CheckBreak(); j++ {
+			var decodeIntoBlank bool
+			// if indefinite, etc, then expand the slice if necessary
+			if j >= rvlen {
+				if f.seq == seqTypeArray {
+					d.arrayCannotExpand(rvlen, j+1)
+					decodeIntoBlank = true
+				} else if f.seq == seqTypeSlice {
+					rv = reflect.Append(rv, reflect.Zero(rtelem0))
+					rvlen++
+					rvChanged = true
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if f.seq == seqTypeChan {
+				rv0 := reflect.New(rtelem0).Elem()
+				d.decodeValue(rv0, fn)
+				rv.Send(rv0)
+			} else if decodeIntoBlank {
+				d.swallow()
+			} else {
+				d.decodeValue(rv.Index(j), fn)
+			}
+		}
+		slh.End()
+	}
+
+	if rvChanged {
+		rv0.Set(rv)
+	}
+}
+
+func (f decFnInfo) kArray(rv reflect.Value) {
+	// f.d.decodeValue(rv.Slice(0, rv.Len()))
+	f.kSlice(rv.Slice(0, rv.Len()))
+}
+
+func (f decFnInfo) kMap(rv reflect.Value) {
+	containerLen := f.dd.ReadMapStart()
+
+	ti := f.ti
+	if rv.IsNil() {
+		rv.Set(reflect.MakeMap(ti.rt))
+	}
+
+	if containerLen == 0 {
+		// f.dd.ReadMapEnd()
+		return
+	}
+
+	d := f.d
+
+	ktype, vtype := ti.rt.Key(), ti.rt.Elem()
+	ktypeId := reflect.ValueOf(ktype).Pointer()
+	var keyFn, valFn decFn
+	var xtyp reflect.Type
+	for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() {
+	}
+	keyFn = d.getDecFn(xtyp, true, true)
+	for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() {
+	}
+	valFn = d.getDecFn(xtyp, true, true)
+	// for j := 0; j < containerLen; j++ {
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			rvk := reflect.New(ktype).Elem()
+			d.decodeValue(rvk, keyFn)
+
+			// special case if a byte array.
+			if ktypeId == intfTypId {
+				rvk = rvk.Elem()
+				if rvk.Type() == uint8SliceTyp {
+					rvk = reflect.ValueOf(string(rvk.Bytes()))
+				}
+			}
+			rvv := rv.MapIndex(rvk)
+			// TODO: is !IsValid check required?
+			if !rvv.IsValid() {
+				rvv = reflect.New(vtype).Elem()
+			}
+			d.decodeValue(rvv, valFn)
+			rv.SetMapIndex(rvk, rvv)
+		}
+	} else {
+		for j := 0; !f.dd.CheckBreak(); j++ {
+			if j > 0 {
+				f.dd.ReadMapEntrySeparator()
+			}
+			rvk := reflect.New(ktype).Elem()
+			d.decodeValue(rvk, keyFn)
+
+			// special case if a byte array.
+			if ktypeId == intfTypId {
+				rvk = rvk.Elem()
+				if rvk.Type() == uint8SliceTyp {
+					rvk = reflect.ValueOf(string(rvk.Bytes()))
+				}
+			}
+			rvv := rv.MapIndex(rvk)
+			if !rvv.IsValid() {
+				rvv = reflect.New(vtype).Elem()
+			}
+			f.dd.ReadMapKVSeparator()
+			d.decodeValue(rvv, valFn)
+			rv.SetMapIndex(rvk, rvv)
+		}
+		f.dd.ReadMapEnd()
+	}
+}
+
+type rtidDecFn struct {
+	rtid uintptr
+	fn   decFn
+}
+
+// A Decoder reads and decodes an object from an input stream in the codec format.
+type Decoder struct {
+	// hopefully, reduce derefencing cost by laying the decReader inside the Decoder.
+	// Try to put things that go together to fit within a cache line (8 words).
+
+	d decDriver
+	r decReader
+	//sa [32]rtidDecFn
+	s []rtidDecFn
+	h *BasicHandle
+
+	rb    bytesDecReader
+	hh    Handle
+	be    bool // is binary encoding
+	bytes bool // is bytes reader
+
+	ri ioDecReader
+	f  map[uintptr]decFn
+	_  uintptr // for alignment purposes, so next one starts from a cache line
+
+	b [scratchByteArrayLen]byte
+}
+
+// NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader.
+//
+// For efficiency, Users are encouraged to pass in a memory buffered reader
+// (eg bufio.Reader, bytes.Buffer).
+func NewDecoder(r io.Reader, h Handle) (d *Decoder) {
+	d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()}
+	//d.s = d.sa[:0]
+	d.ri.x = &d.b
+	d.ri.bs.r = r
+	var ok bool
+	d.ri.br, ok = r.(decReaderByteScanner)
+	if !ok {
+		d.ri.br = &d.ri.bs
+	}
+	d.r = &d.ri
+	d.d = h.newDecDriver(d)
+	return
+}
+
+// NewDecoderBytes returns a Decoder which efficiently decodes directly
+// from a byte slice with zero copying.
+func NewDecoderBytes(in []byte, h Handle) (d *Decoder) {
+	d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary(), bytes: true}
+	//d.s = d.sa[:0]
+	d.rb.b = in
+	d.rb.a = len(in)
+	d.r = &d.rb
+	d.d = h.newDecDriver(d)
+	// d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri})
+	return
+}
+
+// Decode decodes the stream from reader and stores the result in the
+// value pointed to by v. v cannot be a nil pointer. v can also be
+// a reflect.Value of a pointer.
+//
+// Note that a pointer to a nil interface is not a nil pointer.
+// If you do not know what type of stream it is, pass in a pointer to a nil interface.
+// We will decode and store a value in that nil interface.
+//
+// Sample usages:
+//   // Decoding into a non-nil typed value
+//   var f float32
+//   err = codec.NewDecoder(r, handle).Decode(&f)
+//
+//   // Decoding into nil interface
+//   var v interface{}
+//   dec := codec.NewDecoder(r, handle)
+//   err = dec.Decode(&v)
+//
+// When decoding into a nil interface{}, we will decode into an appropriate value based
+// on the contents of the stream:
+//   - Numbers are decoded as float64, int64 or uint64.
+//   - Other values are decoded appropriately depending on the type:
+//     bool, string, []byte, time.Time, etc
+//   - Extensions are decoded as RawExt (if no ext function registered for the tag)
+// Configurations exist on the Handle to override defaults
+// (e.g. for MapType, SliceType and how to decode raw bytes).
+//
+// When decoding into a non-nil interface{} value, the mode of encoding is based on the
+// type of the value. When a value is seen:
+//   - If an extension is registered for it, call that extension function
+//   - If it implements BinaryUnmarshaler, call its UnmarshalBinary(data []byte) error
+//   - Else decode it based on its reflect.Kind
+//
+// There are some special rules when decoding into containers (slice/array/map/struct).
+// Decode will typically use the stream contents to UPDATE the container.
+//   - A map can be decoded from a stream map, by updating matching keys.
+//   - A slice can be decoded from a stream array,
+//     by updating the first n elements, where n is length of the stream.
+//   - A slice can be decoded from a stream map, by decoding as if
+//     it contains a sequence of key-value pairs.
+//   - A struct can be decoded from a stream map, by updating matching fields.
+//   - A struct can be decoded from a stream array,
+//     by updating fields as they occur in the struct (by index).
+//
+// When decoding a stream map or array with length of 0 into a nil map or slice,
+// we reset the destination map or slice to a zero-length value.
+//
+// However, when decoding a stream nil, we reset the destination container
+// to its "zero" value (e.g. nil for slice/map, etc).
+//
+func (d *Decoder) Decode(v interface{}) (err error) {
+	defer panicToErr(&err)
+	d.decode(v)
+	return
+}
+
+// this is not a smart swallow, as it allocates objects and does unnecessary work.
+func (d *Decoder) swallowViaHammer() {
+	var blank interface{}
+	d.decodeValue(reflect.ValueOf(&blank).Elem(), decFn{})
+}
+
+func (d *Decoder) swallow() {
+	// smarter decode that just swallows the content
+	dd := d.d
+	switch {
+	case dd.TryDecodeAsNil():
+	case dd.IsContainerType(valueTypeMap):
+		containerLen := dd.ReadMapStart()
+		clenGtEqualZero := containerLen >= 0
+		for j := 0; ; j++ {
+			if clenGtEqualZero {
+				if j >= containerLen {
+					break
+				}
+			} else if dd.CheckBreak() {
+				break
+			}
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			d.swallow()
+			dd.ReadMapKVSeparator()
+			d.swallow()
+		}
+		dd.ReadMapEnd()
+	case dd.IsContainerType(valueTypeArray):
+		containerLenS := dd.ReadArrayStart()
+		clenGtEqualZero := containerLenS >= 0
+		for j := 0; ; j++ {
+			if clenGtEqualZero {
+				if j >= containerLenS {
+					break
+				}
+			} else if dd.CheckBreak() {
+				break
+			}
+			if j > 0 {
+				dd.ReadArrayEntrySeparator()
+			}
+			d.swallow()
+		}
+		dd.ReadArrayEnd()
+	case dd.IsContainerType(valueTypeBytes):
+		dd.DecodeBytes(d.b[:], false, true)
+	case dd.IsContainerType(valueTypeString):
+		dd.DecodeBytes(d.b[:], true, true)
+		// dd.DecodeStringAsBytes(d.b[:])
+	default:
+		// these are all primitives, which we can get from decodeNaked
+		dd.DecodeNaked()
+	}
+}
+
+// MustDecode is like Decode, but panics if unable to Decode.
+// This provides insight to the code location that triggered the error.
+func (d *Decoder) MustDecode(v interface{}) {
+	d.decode(v)
+}
+
+func (d *Decoder) decode(iv interface{}) {
+	// if ics, ok := iv.(Selfer); ok {
+	// 	ics.CodecDecodeSelf(d)
+	// 	return
+	// }
+
+	if d.d.TryDecodeAsNil() {
+		switch v := iv.(type) {
+		case nil:
+		case *string:
+			*v = ""
+		case *bool:
+			*v = false
+		case *int:
+			*v = 0
+		case *int8:
+			*v = 0
+		case *int16:
+			*v = 0
+		case *int32:
+			*v = 0
+		case *int64:
+			*v = 0
+		case *uint:
+			*v = 0
+		case *uint8:
+			*v = 0
+		case *uint16:
+			*v = 0
+		case *uint32:
+			*v = 0
+		case *uint64:
+			*v = 0
+		case *float32:
+			*v = 0
+		case *float64:
+			*v = 0
+		case *[]uint8:
+			*v = nil
+		case reflect.Value:
+			d.chkPtrValue(v)
+			v = v.Elem()
+			if v.IsValid() {
+				v.Set(reflect.Zero(v.Type()))
+			}
+		default:
+			rv := reflect.ValueOf(iv)
+			d.chkPtrValue(rv)
+			rv = rv.Elem()
+			if rv.IsValid() {
+				rv.Set(reflect.Zero(rv.Type()))
+			}
+		}
+		return
+	}
+
+	switch v := iv.(type) {
+	case nil:
+		d.error(cannotDecodeIntoNilErr)
+		return
+
+	case Selfer:
+		v.CodecDecodeSelf(d)
+
+	case reflect.Value:
+		d.chkPtrValue(v)
+		d.decodeValueNotNil(v.Elem(), decFn{})
+
+	case *string:
+
+		*v = d.d.DecodeString()
+	case *bool:
+		*v = d.d.DecodeBool()
+	case *int:
+		*v = int(d.d.DecodeInt(intBitsize))
+	case *int8:
+		*v = int8(d.d.DecodeInt(8))
+	case *int16:
+		*v = int16(d.d.DecodeInt(16))
+	case *int32:
+		*v = int32(d.d.DecodeInt(32))
+	case *int64:
+		*v = d.d.DecodeInt(64)
+	case *uint:
+		*v = uint(d.d.DecodeUint(uintBitsize))
+	case *uint8:
+		*v = uint8(d.d.DecodeUint(8))
+	case *uint16:
+		*v = uint16(d.d.DecodeUint(16))
+	case *uint32:
+		*v = uint32(d.d.DecodeUint(32))
+	case *uint64:
+		*v = d.d.DecodeUint(64)
+	case *float32:
+		*v = float32(d.d.DecodeFloat(true))
+	case *float64:
+		*v = d.d.DecodeFloat(false)
+	case *[]uint8:
+		*v = d.d.DecodeBytes(*v, false, false)
+
+	case *interface{}:
+		d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), decFn{})
+
+	default:
+		if !fastpathDecodeTypeSwitch(iv, d) {
+			d.decodeI(iv, true, false, false, false)
+		}
+	}
+}
+
+func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Value, proceed bool) {
+	if tryNil && d.d.TryDecodeAsNil() {
+		// No need to check if a ptr, recursively, to determine
+		// whether to set value to nil.
+		// Just always set value to its zero type.
+		if rv.IsValid() { // rv.CanSet() // always settable, except it's invalid
+			rv.Set(reflect.Zero(rv.Type()))
+		}
+		return
+	}
+
+	// If stream is not containing a nil value, then we can deref to the base
+	// non-pointer value, and decode into that.
+	for rv.Kind() == reflect.Ptr {
+		if rv.IsNil() {
+			rv.Set(reflect.New(rv.Type().Elem()))
+		}
+		rv = rv.Elem()
+	}
+	return rv, true
+}
+
+func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) {
+	rv := reflect.ValueOf(iv)
+	if checkPtr {
+		d.chkPtrValue(rv)
+	}
+	rv, proceed := d.preDecodeValue(rv, tryNil)
+	if proceed {
+		fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer)
+		fn.f(fn.i, rv)
+	}
+}
+
+func (d *Decoder) decodeValue(rv reflect.Value, fn decFn) {
+	if rv, proceed := d.preDecodeValue(rv, true); proceed {
+		if fn.f == nil {
+			fn = d.getDecFn(rv.Type(), true, true)
+		}
+		fn.f(fn.i, rv)
+	}
+}
+
+func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn decFn) {
+	if rv, proceed := d.preDecodeValue(rv, false); proceed {
+		if fn.f == nil {
+			fn = d.getDecFn(rv.Type(), true, true)
+		}
+		fn.f(fn.i, rv)
+	}
+}
+
+func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn decFn) {
+	rtid := reflect.ValueOf(rt).Pointer()
+
+	// retrieve or register a focus'ed function for this type
+	// to eliminate need to do the retrieval multiple times
+
+	// if d.f == nil && d.s == nil { debugf("---->Creating new dec f map for type: %v\n", rt) }
+	var ok bool
+	if useMapForCodecCache {
+		fn, ok = d.f[rtid]
+	} else {
+		for _, v := range d.s {
+			if v.rtid == rtid {
+				fn, ok = v.fn, true
+				break
+			}
+		}
+	}
+	if ok {
+		return
+	}
+
+	// debugf("\tCreating new dec fn for type: %v\n", rt)
+	ti := getTypeInfo(rtid, rt)
+	var fi decFnInfo
+	fi.dd = d.d
+	// fi.decFnInfoX = new(decFnInfoX)
+
+	// An extension can be registered for any type, regardless of the Kind
+	// (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc.
+	//
+	// We can't check if it's an extension byte here first, because the user may have
+	// registered a pointer or non-pointer type, meaning we may have to recurse first
+	// before matching a mapped type, even though the extension byte is already detected.
+	//
+	// NOTE: if decoding into a nil interface{}, we return a non-nil
+	// value except even if the container registers a length of 0.
+	if checkCodecSelfer && ti.cs {
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fn.f = (decFnInfo).selferUnmarshal
+	} else if rtid == rawExtTypId {
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fn.f = (decFnInfo).rawExt
+	} else if d.d.IsBuiltinType(rtid) {
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fn.f = (decFnInfo).builtin
+	} else if xfFn := d.h.getExt(rtid); xfFn != nil {
+		// fi.decFnInfoX = &decFnInfoX{xfTag: xfFn.tag, xfFn: xfFn.ext}
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext
+		fn.f = (decFnInfo).ext
+	} else if supportMarshalInterfaces && d.be && ti.bunm {
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fn.f = (decFnInfo).binaryUnmarshal
+	} else if supportMarshalInterfaces && !d.be && ti.tunm {
+		fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+		fn.f = (decFnInfo).textUnmarshal
+	} else {
+		rk := rt.Kind()
+		if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) {
+			if rt.PkgPath() == "" {
+				if idx := fastpathAV.index(rtid); idx != -1 {
+					fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+					fn.f = fastpathAV[idx].decfn
+				}
+			} else {
+				// use mapping for underlying type if there
+				ok = false
+				var rtu reflect.Type
+				if rk == reflect.Map {
+					rtu = reflect.MapOf(rt.Key(), rt.Elem())
+				} else {
+					rtu = reflect.SliceOf(rt.Elem())
+				}
+				rtuid := reflect.ValueOf(rtu).Pointer()
+				if idx := fastpathAV.index(rtuid); idx != -1 {
+					xfnf := fastpathAV[idx].decfn
+					xrt := fastpathAV[idx].rt
+					fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+					fn.f = func(xf decFnInfo, xrv reflect.Value) {
+						// xfnf(xf, xrv.Convert(xrt))
+						xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem())
+					}
+				}
+			}
+		}
+		if fn.f == nil {
+			switch rk {
+			case reflect.String:
+				fn.f = (decFnInfo).kString
+			case reflect.Bool:
+				fn.f = (decFnInfo).kBool
+			case reflect.Int:
+				fn.f = (decFnInfo).kInt
+			case reflect.Int64:
+				fn.f = (decFnInfo).kInt64
+			case reflect.Int32:
+				fn.f = (decFnInfo).kInt32
+			case reflect.Int8:
+				fn.f = (decFnInfo).kInt8
+			case reflect.Int16:
+				fn.f = (decFnInfo).kInt16
+			case reflect.Float32:
+				fn.f = (decFnInfo).kFloat32
+			case reflect.Float64:
+				fn.f = (decFnInfo).kFloat64
+			case reflect.Uint8:
+				fn.f = (decFnInfo).kUint8
+			case reflect.Uint64:
+				fn.f = (decFnInfo).kUint64
+			case reflect.Uint:
+				fn.f = (decFnInfo).kUint
+			case reflect.Uint32:
+				fn.f = (decFnInfo).kUint32
+			case reflect.Uint16:
+				fn.f = (decFnInfo).kUint16
+				// case reflect.Ptr:
+				// 	fn.f = (decFnInfo).kPtr
+			case reflect.Interface:
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+				fn.f = (decFnInfo).kInterface
+			case reflect.Struct:
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+				fn.f = (decFnInfo).kStruct
+			case reflect.Chan:
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeChan}
+				fn.f = (decFnInfo).kSlice
+			case reflect.Slice:
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeSlice}
+				fn.f = (decFnInfo).kSlice
+			case reflect.Array:
+				// fi.decFnInfoX = &decFnInfoX{array: true}
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeArray}
+				fn.f = (decFnInfo).kArray
+			case reflect.Map:
+				fi.decFnInfoX = &decFnInfoX{d: d, ti: ti}
+				fn.f = (decFnInfo).kMap
+			default:
+				fn.f = (decFnInfo).kErr
+			}
+		}
+	}
+	fn.i = fi
+
+	if useMapForCodecCache {
+		if d.f == nil {
+			d.f = make(map[uintptr]decFn, 32)
+		}
+		d.f[rtid] = fn
+	} else {
+		if d.s == nil {
+			d.s = make([]rtidDecFn, 0, 32)
+		}
+		d.s = append(d.s, rtidDecFn{rtid, fn})
+	}
+	return
+}
+
+func (d *Decoder) structFieldNotFound(index int, rvkencname string) {
+	if d.h.ErrorIfNoField {
+		if index >= 0 {
+			d.errorf("no matching struct field found when decoding stream array at index %v", index)
+			return
+		} else if rvkencname != "" {
+			d.errorf("no matching struct field found when decoding stream map with key %s", rvkencname)
+			return
+		}
+	}
+	d.swallow()
+}
+
+func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) {
+	if d.h.ErrorIfNoArrayExpand {
+		d.errorf("cannot expand array len during decode from %v to %v", sliceLen, streamLen)
+	}
+}
+
+func (d *Decoder) chkPtrValue(rv reflect.Value) {
+	// We can only decode into a non-nil pointer
+	if rv.Kind() == reflect.Ptr && !rv.IsNil() {
+		return
+	}
+	if !rv.IsValid() {
+		d.error(cannotDecodeIntoNilErr)
+		return
+	}
+	if !rv.CanInterface() {
+		d.errorf("cannot decode into a value without an interface: %v", rv)
+		return
+	}
+	rvi := rv.Interface()
+	d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi)
+}
+
+func (d *Decoder) error(err error) {
+	panic(err)
+}
+
+func (d *Decoder) errorf(format string, params ...interface{}) {
+	err := fmt.Errorf(format, params...)
+	panic(err)
+}
+
+// --------------------------------------------------
+
+// decSliceHelper assists when decoding into a slice, from a map or an array in the stream.
+// A slice can be set from a map or array in stream. This supports the MapBySlice interface.
+type decSliceHelper struct {
+	dd decDriver
+	ct valueType
+}
+
+func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) {
+	x.dd = d.d
+	if x.dd.IsContainerType(valueTypeArray) {
+		x.ct = valueTypeArray
+		clen = x.dd.ReadArrayStart()
+	} else if x.dd.IsContainerType(valueTypeMap) {
+		x.ct = valueTypeMap
+		clen = x.dd.ReadMapStart() * 2
+	} else {
+		d.errorf("only encoded map or array can be decoded into a slice")
+	}
+	return
+}
+
+func (x decSliceHelper) Sep(index int) {
+	if x.ct == valueTypeArray {
+		x.dd.ReadArrayEntrySeparator()
+	} else {
+		if index%2 == 0 {
+			x.dd.ReadMapEntrySeparator()
+		} else {
+			x.dd.ReadMapKVSeparator()
+		}
+	}
+}
+
+func (x decSliceHelper) End() {
+	if x.ct == valueTypeArray {
+		x.dd.ReadArrayEnd()
+	} else {
+		x.dd.ReadMapEnd()
+	}
+}
+
+// func decErr(format string, params ...interface{}) {
+// 	doPanic(msgTagDec, format, params...)
+// }
+
+func decByteSlice(r decReader, clen int, bs []byte) (bsOut []byte) {
+	if clen == 0 {
+		return zeroByteSlice
+	}
+	if len(bs) == clen {
+		bsOut = bs
+	} else if cap(bs) >= clen {
+		bsOut = bs[:clen]
+	} else {
+		bsOut = make([]byte, clen)
+	}
+	r.readb(bsOut)
+	return
+}
+
+func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte) {
+	if xlen := len(in); xlen > 0 {
+		if isBytesReader || xlen <= scratchByteArrayLen {
+			if cap(dest) >= xlen {
+				out = dest[:xlen]
+			} else {
+				out = make([]byte, xlen)
+			}
+			copy(out, in)
+			return
+		}
+	}
+	return in
+}
+
+// // implement overall decReader wrapping both, for possible use inline:
+// type decReaderT struct {
+// 	bytes bool
+// 	rb    *bytesDecReader
+// 	ri    *ioDecReader
+// }
+//
+// // implement *Decoder as a decReader.
+// // Using decReaderT (defined just above) caused performance degradation
+// // possibly because of constant copying the value,
+// // and some value->interface conversion causing allocation.
+// func (d *Decoder) unreadn1() {
+// 	if d.bytes {
+// 		d.rb.unreadn1()
+// 	} else {
+// 		d.ri.unreadn1()
+// 	}
+// }
+
+// func (d *Decoder) readb(b []byte) {
+// 	if d.bytes {
+// 		d.rb.readb(b)
+// 	} else {
+// 		d.ri.readb(b)
+// 	}
+// }
+
+// func (d *Decoder) readx(n int) []byte {
+// 	if d.bytes {
+// 		return d.rb.readx(n)
+// 	} else {
+// 		return d.ri.readx(n)
+// 	}
+// }
+
+// func (d *Decoder) readn1() uint8 {
+// 	if d.bytes {
+// 		return d.rb.readn1()
+// 	} else {
+// 		return d.ri.readn1()
+// 	}
+// }
+
+// func (d *Decoder) readn1eof() (v uint8, eof bool) {
+// 	if d.bytes {
+// 		return d.rb.readn1eof()
+// 	} else {
+// 		return d.ri.readn1eof()
+// 	}
+// }
+
+// var _ decReader = (*Decoder)(nil) // decReaderT{} //

+ 1232 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go

@@ -0,0 +1,1232 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"bytes"
+	"encoding"
+	"errors"
+	"fmt"
+	"io"
+	"reflect"
+	"sort"
+	"sync"
+)
+
+const (
+	defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024
+)
+
+// AsSymbolFlag defines what should be encoded as symbols.
+type AsSymbolFlag uint8
+
+const (
+	// AsSymbolDefault is default.
+	// Currently, this means only encode struct field names as symbols.
+	// The default is subject to change.
+	AsSymbolDefault AsSymbolFlag = iota
+
+	// AsSymbolAll means encode anything which could be a symbol as a symbol.
+	AsSymbolAll = 0xfe
+
+	// AsSymbolNone means do not encode anything as a symbol.
+	AsSymbolNone = 1 << iota
+
+	// AsSymbolMapStringKeys means encode keys in map[string]XXX as symbols.
+	AsSymbolMapStringKeysFlag
+
+	// AsSymbolStructFieldName means encode struct field names as symbols.
+	AsSymbolStructFieldNameFlag
+)
+
+// encWriter abstracts writing to a byte array or to an io.Writer.
+type encWriter interface {
+	writeb([]byte)
+	writestr(string)
+	writen1(byte)
+	writen2(byte, byte)
+	atEndOfEncode()
+}
+
+// encDriver abstracts the actual codec (binc vs msgpack, etc)
+type encDriver interface {
+	IsBuiltinType(rt uintptr) bool
+	EncodeBuiltin(rt uintptr, v interface{})
+	EncodeNil()
+	EncodeInt(i int64)
+	EncodeUint(i uint64)
+	EncodeBool(b bool)
+	EncodeFloat32(f float32)
+	EncodeFloat64(f float64)
+	// encodeExtPreamble(xtag byte, length int)
+	EncodeRawExt(re *RawExt, e *Encoder)
+	EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder)
+	EncodeArrayStart(length int)
+	EncodeArrayEnd()
+	EncodeArrayEntrySeparator()
+	EncodeMapStart(length int)
+	EncodeMapEnd()
+	EncodeMapEntrySeparator()
+	EncodeMapKVSeparator()
+	EncodeString(c charEncoding, v string)
+	EncodeSymbol(v string)
+	EncodeStringBytes(c charEncoding, v []byte)
+	//TODO
+	//encBignum(f *big.Int)
+	//encStringRunes(c charEncoding, v []rune)
+}
+
+type encNoSeparator struct{}
+
+func (_ encNoSeparator) EncodeMapEnd()              {}
+func (_ encNoSeparator) EncodeArrayEnd()            {}
+func (_ encNoSeparator) EncodeArrayEntrySeparator() {}
+func (_ encNoSeparator) EncodeMapEntrySeparator()   {}
+func (_ encNoSeparator) EncodeMapKVSeparator()      {}
+
+type encStructFieldBytesV struct {
+	b []byte
+	v reflect.Value
+}
+
+type encStructFieldBytesVslice []encStructFieldBytesV
+
+func (p encStructFieldBytesVslice) Len() int           { return len(p) }
+func (p encStructFieldBytesVslice) Less(i, j int) bool { return bytes.Compare(p[i].b, p[j].b) == -1 }
+func (p encStructFieldBytesVslice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }
+
+type ioEncWriterWriter interface {
+	WriteByte(c byte) error
+	WriteString(s string) (n int, err error)
+	Write(p []byte) (n int, err error)
+}
+
+type ioEncStringWriter interface {
+	WriteString(s string) (n int, err error)
+}
+
+type EncodeOptions struct {
+	// Encode a struct as an array, and not as a map
+	StructToArray bool
+
+	// Canonical representation means that encoding a value will always result in the same
+	// sequence of bytes.
+	//
+	// This mostly will apply to maps. In this case, codec will do more work to encode the
+	// map keys out of band, and then sort them, before writing out the map to the stream.
+	Canonical bool
+
+	// AsSymbols defines what should be encoded as symbols.
+	//
+	// Encoding as symbols can reduce the encoded size significantly.
+	//
+	// However, during decoding, each string to be encoded as a symbol must
+	// be checked to see if it has been seen before. Consequently, encoding time
+	// will increase if using symbols, because string comparisons has a clear cost.
+	//
+	// Sample values:
+	//   AsSymbolNone
+	//   AsSymbolAll
+	//   AsSymbolMapStringKeys
+	//   AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag
+	AsSymbols AsSymbolFlag
+}
+
+// ---------------------------------------------
+
+type simpleIoEncWriterWriter struct {
+	w  io.Writer
+	bw io.ByteWriter
+	sw ioEncStringWriter
+}
+
+func (o *simpleIoEncWriterWriter) WriteByte(c byte) (err error) {
+	if o.bw != nil {
+		return o.bw.WriteByte(c)
+	}
+	_, err = o.w.Write([]byte{c})
+	return
+}
+
+func (o *simpleIoEncWriterWriter) WriteString(s string) (n int, err error) {
+	if o.sw != nil {
+		return o.sw.WriteString(s)
+	}
+	// return o.w.Write([]byte(s))
+	return o.w.Write(bytesView(s))
+}
+
+func (o *simpleIoEncWriterWriter) Write(p []byte) (n int, err error) {
+	return o.w.Write(p)
+}
+
+// ----------------------------------------
+
+// ioEncWriter implements encWriter and can write to an io.Writer implementation
+type ioEncWriter struct {
+	w ioEncWriterWriter
+	// x [8]byte // temp byte array re-used internally for efficiency
+}
+
+func (z *ioEncWriter) writeb(bs []byte) {
+	if len(bs) == 0 {
+		return
+	}
+	n, err := z.w.Write(bs)
+	if err != nil {
+		panic(err)
+	}
+	if n != len(bs) {
+		panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(bs), n))
+	}
+}
+
+func (z *ioEncWriter) writestr(s string) {
+	n, err := z.w.WriteString(s)
+	if err != nil {
+		panic(err)
+	}
+	if n != len(s) {
+		panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(s), n))
+	}
+}
+
+func (z *ioEncWriter) writen1(b byte) {
+	if err := z.w.WriteByte(b); err != nil {
+		panic(err)
+	}
+}
+
+func (z *ioEncWriter) writen2(b1 byte, b2 byte) {
+	z.writen1(b1)
+	z.writen1(b2)
+}
+
+func (z *ioEncWriter) atEndOfEncode() {}
+
+// ----------------------------------------
+
+// bytesEncWriter implements encWriter and can write to an byte slice.
+// It is used by Marshal function.
+type bytesEncWriter struct {
+	b   []byte
+	c   int     // cursor
+	out *[]byte // write out on atEndOfEncode
+}
+
+func (z *bytesEncWriter) writeb(s []byte) {
+	if len(s) > 0 {
+		c := z.grow(len(s))
+		copy(z.b[c:], s)
+	}
+}
+
+func (z *bytesEncWriter) writestr(s string) {
+	if len(s) > 0 {
+		c := z.grow(len(s))
+		copy(z.b[c:], s)
+	}
+}
+
+func (z *bytesEncWriter) writen1(b1 byte) {
+	c := z.grow(1)
+	z.b[c] = b1
+}
+
+func (z *bytesEncWriter) writen2(b1 byte, b2 byte) {
+	c := z.grow(2)
+	z.b[c] = b1
+	z.b[c+1] = b2
+}
+
+func (z *bytesEncWriter) atEndOfEncode() {
+	*(z.out) = z.b[:z.c]
+}
+
+func (z *bytesEncWriter) grow(n int) (oldcursor int) {
+	oldcursor = z.c
+	z.c = oldcursor + n
+	if z.c > len(z.b) {
+		if z.c > cap(z.b) {
+			// Tried using appendslice logic: (if cap < 1024, *2, else *1.25).
+			// However, it was too expensive, causing too many iterations of copy.
+			// Using bytes.Buffer model was much better (2*cap + n)
+			bs := make([]byte, 2*cap(z.b)+n)
+			copy(bs, z.b[:oldcursor])
+			z.b = bs
+		} else {
+			z.b = z.b[:cap(z.b)]
+		}
+	}
+	return
+}
+
+// ---------------------------------------------
+
+type encFnInfoX struct {
+	e     *Encoder
+	ti    *typeInfo
+	xfFn  Ext
+	xfTag uint64
+	seq   seqType
+}
+
+type encFnInfo struct {
+	// use encFnInfo as a value receiver.
+	// keep most of it less-used variables accessible via a pointer (*encFnInfoX).
+	// As sweet spot for value-receiver is 3 words, keep everything except
+	// encDriver (which everyone needs) directly accessible.
+	// ensure encFnInfoX is set for everyone who needs it i.e.
+	// rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath
+
+	ee encDriver
+	*encFnInfoX
+}
+
+func (f encFnInfo) builtin(rv reflect.Value) {
+	f.ee.EncodeBuiltin(f.ti.rtid, rv.Interface())
+}
+
+func (f encFnInfo) rawExt(rv reflect.Value) {
+	// rev := rv.Interface().(RawExt)
+	// f.ee.EncodeRawExt(&rev, f.e)
+	var re *RawExt
+	if rv.CanAddr() {
+		re = rv.Addr().Interface().(*RawExt)
+	} else {
+		rev := rv.Interface().(RawExt)
+		re = &rev
+	}
+	f.ee.EncodeRawExt(re, f.e)
+}
+
+func (f encFnInfo) ext(rv reflect.Value) {
+	// if this is a struct and it was addressable, then pass the address directly (not the value)
+	if rv.CanAddr() && rv.Kind() == reflect.Struct {
+		rv = rv.Addr()
+	}
+	f.ee.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e)
+}
+
+func (f encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) {
+	if indir == 0 {
+		v = rv.Interface()
+	} else if indir == -1 {
+		v = rv.Addr().Interface()
+	} else {
+		for j := int8(0); j < indir; j++ {
+			if rv.IsNil() {
+				f.ee.EncodeNil()
+				return
+			}
+			rv = rv.Elem()
+		}
+		v = rv.Interface()
+	}
+	return v, true
+}
+
+func (f encFnInfo) selferMarshal(rv reflect.Value) {
+	if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed {
+		v.(Selfer).CodecEncodeSelf(f.e)
+	}
+}
+
+func (f encFnInfo) binaryMarshal(rv reflect.Value) {
+	if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed {
+		bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary()
+		if fnerr != nil {
+			panic(fnerr)
+		}
+		if bs == nil {
+			f.ee.EncodeNil()
+		} else {
+			f.ee.EncodeStringBytes(c_RAW, bs)
+		}
+	}
+}
+
+func (f encFnInfo) textMarshal(rv reflect.Value) {
+	if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed {
+		// debugf(">>>> encoding.TextMarshaler: %T", rv.Interface())
+		bs, fnerr := v.(encoding.TextMarshaler).MarshalText()
+		if fnerr != nil {
+			panic(fnerr)
+		}
+		if bs == nil {
+			f.ee.EncodeNil()
+		} else {
+			f.ee.EncodeStringBytes(c_UTF8, bs)
+		}
+	}
+}
+
+func (f encFnInfo) kBool(rv reflect.Value) {
+	f.ee.EncodeBool(rv.Bool())
+}
+
+func (f encFnInfo) kString(rv reflect.Value) {
+	f.ee.EncodeString(c_UTF8, rv.String())
+}
+
+func (f encFnInfo) kFloat64(rv reflect.Value) {
+	f.ee.EncodeFloat64(rv.Float())
+}
+
+func (f encFnInfo) kFloat32(rv reflect.Value) {
+	f.ee.EncodeFloat32(float32(rv.Float()))
+}
+
+func (f encFnInfo) kInt(rv reflect.Value) {
+	f.ee.EncodeInt(rv.Int())
+}
+
+func (f encFnInfo) kUint(rv reflect.Value) {
+	f.ee.EncodeUint(rv.Uint())
+}
+
+func (f encFnInfo) kInvalid(rv reflect.Value) {
+	f.ee.EncodeNil()
+}
+
+func (f encFnInfo) kErr(rv reflect.Value) {
+	f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv)
+}
+
+func (f encFnInfo) kSlice(rv reflect.Value) {
+	ti := f.ti
+	// array may be non-addressable, so we have to manage with care
+	//   (don't call rv.Bytes, rv.Slice, etc).
+	// E.g. type struct S{B [2]byte};
+	//   Encode(S{}) will bomb on "panic: slice of unaddressable array".
+	if f.seq != seqTypeArray {
+		if rv.IsNil() {
+			f.ee.EncodeNil()
+			return
+		}
+		// If in this method, then there was no extension function defined.
+		// So it's okay to treat as []byte.
+		if ti.rtid == uint8SliceTypId {
+			f.ee.EncodeStringBytes(c_RAW, rv.Bytes())
+			return
+		}
+	}
+	rtelem := ti.rt.Elem()
+	l := rv.Len()
+	if rtelem.Kind() == reflect.Uint8 {
+		switch f.seq {
+		case seqTypeArray:
+			// if l == 0 { f.ee.encodeStringBytes(c_RAW, nil) } else
+			if rv.CanAddr() {
+				f.ee.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes())
+			} else {
+				var bs []byte
+				if l <= cap(f.e.b) {
+					bs = f.e.b[:l]
+				} else {
+					bs = make([]byte, l)
+				}
+				reflect.Copy(reflect.ValueOf(bs), rv)
+				// TODO: Test that reflect.Copy works instead of manual one-by-one
+				// for i := 0; i < l; i++ {
+				// 	bs[i] = byte(rv.Index(i).Uint())
+				// }
+				f.ee.EncodeStringBytes(c_RAW, bs)
+			}
+		case seqTypeSlice:
+			f.ee.EncodeStringBytes(c_RAW, rv.Bytes())
+		case seqTypeChan:
+			bs := f.e.b[:0]
+			// do not use range, so that the number of elements encoded
+			// does not change, and encoding does not hang waiting on someone to close chan.
+			// for b := range rv.Interface().(<-chan byte) {
+			// 	bs = append(bs, b)
+			// }
+			ch := rv.Interface().(<-chan byte)
+			for i := 0; i < l; i++ {
+				bs = append(bs, <-ch)
+			}
+			f.ee.EncodeStringBytes(c_RAW, bs)
+		}
+		return
+	}
+
+	if ti.mbs {
+		if l%2 == 1 {
+			f.e.errorf("mapBySlice requires even slice length, but got %v", l)
+			return
+		}
+		f.ee.EncodeMapStart(l / 2)
+	} else {
+		f.ee.EncodeArrayStart(l)
+	}
+
+	e := f.e
+	sep := !e.be
+	if l > 0 {
+		for rtelem.Kind() == reflect.Ptr {
+			rtelem = rtelem.Elem()
+		}
+		// if kind is reflect.Interface, do not pre-determine the
+		// encoding type, because preEncodeValue may break it down to
+		// a concrete type and kInterface will bomb.
+		var fn encFn
+		if rtelem.Kind() != reflect.Interface {
+			rtelemid := reflect.ValueOf(rtelem).Pointer()
+			fn = e.getEncFn(rtelemid, rtelem, true, true)
+		}
+		// TODO: Consider perf implication of encoding odd index values as symbols if type is string
+		if sep {
+			for j := 0; j < l; j++ {
+				if j > 0 {
+					if ti.mbs {
+						if j%2 == 0 {
+							f.ee.EncodeMapEntrySeparator()
+						} else {
+							f.ee.EncodeMapKVSeparator()
+						}
+					} else {
+						f.ee.EncodeArrayEntrySeparator()
+					}
+				}
+				if f.seq == seqTypeChan {
+					if rv2, ok2 := rv.Recv(); ok2 {
+						e.encodeValue(rv2, fn)
+					}
+				} else {
+					e.encodeValue(rv.Index(j), fn)
+				}
+			}
+		} else {
+			for j := 0; j < l; j++ {
+				if f.seq == seqTypeChan {
+					if rv2, ok2 := rv.Recv(); ok2 {
+						e.encodeValue(rv2, fn)
+					}
+				} else {
+					e.encodeValue(rv.Index(j), fn)
+				}
+			}
+		}
+	}
+
+	if sep {
+		if ti.mbs {
+			f.ee.EncodeMapEnd()
+		} else {
+			f.ee.EncodeArrayEnd()
+		}
+	}
+}
+
+func (f encFnInfo) kStruct(rv reflect.Value) {
+	fti := f.ti
+	e := f.e
+	tisfi := fti.sfip
+	toMap := !(fti.toArray || e.h.StructToArray)
+	newlen := len(fti.sfi)
+	// Use sync.Pool to reduce allocating slices unnecessarily.
+	// The cost of the occasional locking is less than the cost of locking.
+
+	var fkvs []encStructFieldKV
+	var pool *sync.Pool
+	var poolv interface{}
+	idxpool := newlen / 8
+	if encStructPoolLen != 4 {
+		panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed
+	}
+	if idxpool < encStructPoolLen {
+		pool = &encStructPool[idxpool]
+		poolv = pool.Get()
+		switch vv := poolv.(type) {
+		case *[8]encStructFieldKV:
+			fkvs = vv[:newlen]
+		case *[16]encStructFieldKV:
+			fkvs = vv[:newlen]
+		case *[32]encStructFieldKV:
+			fkvs = vv[:newlen]
+		case *[64]encStructFieldKV:
+			fkvs = vv[:newlen]
+		}
+	}
+	if fkvs == nil {
+		fkvs = make([]encStructFieldKV, newlen)
+	}
+	// if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct)
+	if toMap {
+		tisfi = fti.sfi
+	}
+	newlen = 0
+	var kv encStructFieldKV
+	for _, si := range tisfi {
+		kv.v = si.field(rv, false)
+		// if si.i != -1 {
+		// 	rvals[newlen] = rv.Field(int(si.i))
+		// } else {
+		// 	rvals[newlen] = rv.FieldByIndex(si.is)
+		// }
+		if toMap {
+			if si.omitEmpty && isEmptyValue(kv.v) {
+				continue
+			}
+			kv.k = si.encName
+		} else {
+			// use the zero value.
+			// if a reference or struct, set to nil (so you do not output too much)
+			if si.omitEmpty && isEmptyValue(kv.v) {
+				switch kv.v.Kind() {
+				case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array,
+					reflect.Map, reflect.Slice:
+					kv.v = reflect.Value{} //encode as nil
+				}
+			}
+		}
+		fkvs[newlen] = kv
+		newlen++
+	}
+
+	// debugf(">>>> kStruct: newlen: %v", newlen)
+	sep := !e.be
+	ee := f.ee //don't dereference everytime
+	if sep {
+		if toMap {
+			ee.EncodeMapStart(newlen)
+			// asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0
+			asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0
+			for j := 0; j < newlen; j++ {
+				kv = fkvs[j]
+				if j > 0 {
+					ee.EncodeMapEntrySeparator()
+				}
+				if asSymbols {
+					ee.EncodeSymbol(kv.k)
+				} else {
+					ee.EncodeString(c_UTF8, kv.k)
+				}
+				ee.EncodeMapKVSeparator()
+				e.encodeValue(kv.v, encFn{})
+			}
+			ee.EncodeMapEnd()
+		} else {
+			ee.EncodeArrayStart(newlen)
+			for j := 0; j < newlen; j++ {
+				kv = fkvs[j]
+				if j > 0 {
+					ee.EncodeArrayEntrySeparator()
+				}
+				e.encodeValue(kv.v, encFn{})
+			}
+			ee.EncodeArrayEnd()
+		}
+	} else {
+		if toMap {
+			ee.EncodeMapStart(newlen)
+			// asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0
+			asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0
+			for j := 0; j < newlen; j++ {
+				kv = fkvs[j]
+				if asSymbols {
+					ee.EncodeSymbol(kv.k)
+				} else {
+					ee.EncodeString(c_UTF8, kv.k)
+				}
+				e.encodeValue(kv.v, encFn{})
+			}
+		} else {
+			ee.EncodeArrayStart(newlen)
+			for j := 0; j < newlen; j++ {
+				kv = fkvs[j]
+				e.encodeValue(kv.v, encFn{})
+			}
+		}
+	}
+
+	// do not use defer. Instead, use explicit pool return at end of function.
+	// defer has a cost we are trying to avoid.
+	// If there is a panic and these slices are not returned, it is ok.
+	if pool != nil {
+		pool.Put(poolv)
+	}
+}
+
+// func (f encFnInfo) kPtr(rv reflect.Value) {
+// 	debugf(">>>>>>> ??? encode kPtr called - shouldn't get called")
+// 	if rv.IsNil() {
+// 		f.ee.encodeNil()
+// 		return
+// 	}
+// 	f.e.encodeValue(rv.Elem())
+// }
+
+func (f encFnInfo) kInterface(rv reflect.Value) {
+	if rv.IsNil() {
+		f.ee.EncodeNil()
+		return
+	}
+	f.e.encodeValue(rv.Elem(), encFn{})
+}
+
+func (f encFnInfo) kMap(rv reflect.Value) {
+	if rv.IsNil() {
+		f.ee.EncodeNil()
+		return
+	}
+
+	l := rv.Len()
+	f.ee.EncodeMapStart(l)
+	e := f.e
+	sep := !e.be
+	if l == 0 {
+		if sep {
+			f.ee.EncodeMapEnd()
+		}
+		return
+	}
+	var asSymbols bool
+	// determine the underlying key and val encFn's for the map.
+	// This eliminates some work which is done for each loop iteration i.e.
+	// rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn.
+	//
+	// However, if kind is reflect.Interface, do not pre-determine the
+	// encoding type, because preEncodeValue may break it down to
+	// a concrete type and kInterface will bomb.
+	var keyFn, valFn encFn
+	ti := f.ti
+	rtkey := ti.rt.Key()
+	rtval := ti.rt.Elem()
+	rtkeyid := reflect.ValueOf(rtkey).Pointer()
+	// keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String
+	var keyTypeIsString = rtkeyid == stringTypId
+	if keyTypeIsString {
+		asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	} else {
+		for rtkey.Kind() == reflect.Ptr {
+			rtkey = rtkey.Elem()
+		}
+		if rtkey.Kind() != reflect.Interface {
+			rtkeyid = reflect.ValueOf(rtkey).Pointer()
+			keyFn = e.getEncFn(rtkeyid, rtkey, true, true)
+		}
+	}
+	for rtval.Kind() == reflect.Ptr {
+		rtval = rtval.Elem()
+	}
+	if rtval.Kind() != reflect.Interface {
+		rtvalid := reflect.ValueOf(rtval).Pointer()
+		valFn = e.getEncFn(rtvalid, rtval, true, true)
+	}
+	mks := rv.MapKeys()
+	// for j, lmks := 0, len(mks); j < lmks; j++ {
+	ee := f.ee //don't dereference everytime
+	if e.h.Canonical {
+		// first encode each key to a []byte first, then sort them, then record
+		// println(">>>>>>>> CANONICAL <<<<<<<<")
+		var mksv []byte // temporary byte slice for the encoding
+		e2 := NewEncoderBytes(&mksv, e.hh)
+		mksbv := make([]encStructFieldBytesV, len(mks))
+		for i, k := range mks {
+			l := len(mksv)
+			e2.MustEncode(k)
+			mksbv[i].v = k
+			mksbv[i].b = mksv[l:]
+		}
+		sort.Sort(encStructFieldBytesVslice(mksbv))
+		for j := range mksbv {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.w.writeb(mksbv[j].b)
+			ee.EncodeMapKVSeparator()
+			e.encodeValue(rv.MapIndex(mksbv[j].v), valFn)
+		}
+		ee.EncodeMapEnd()
+	} else if sep {
+		for j := range mks {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if keyTypeIsString {
+				if asSymbols {
+					ee.EncodeSymbol(mks[j].String())
+				} else {
+					ee.EncodeString(c_UTF8, mks[j].String())
+				}
+			} else {
+				e.encodeValue(mks[j], keyFn)
+			}
+			ee.EncodeMapKVSeparator()
+			e.encodeValue(rv.MapIndex(mks[j]), valFn)
+		}
+		ee.EncodeMapEnd()
+	} else {
+		for j := range mks {
+			if keyTypeIsString {
+				if asSymbols {
+					ee.EncodeSymbol(mks[j].String())
+				} else {
+					ee.EncodeString(c_UTF8, mks[j].String())
+				}
+			} else {
+				e.encodeValue(mks[j], keyFn)
+			}
+			e.encodeValue(rv.MapIndex(mks[j]), valFn)
+		}
+	}
+}
+
+// --------------------------------------------------
+
+// encFn encapsulates the captured variables and the encode function.
+// This way, we only do some calculations one times, and pass to the
+// code block that should be called (encapsulated in a function)
+// instead of executing the checks every time.
+type encFn struct {
+	i encFnInfo
+	f func(encFnInfo, reflect.Value)
+}
+
+// --------------------------------------------------
+
+type rtidEncFn struct {
+	rtid uintptr
+	fn   encFn
+}
+
+// An Encoder writes an object to an output stream in the codec format.
+type Encoder struct {
+	// hopefully, reduce derefencing cost by laying the encWriter inside the Encoder
+	e  encDriver
+	w  encWriter
+	s  []rtidEncFn
+	be bool // is binary encoding
+
+	wi ioEncWriter
+	wb bytesEncWriter
+	h  *BasicHandle
+
+	hh Handle
+	f  map[uintptr]encFn
+	b  [scratchByteArrayLen]byte
+}
+
+// NewEncoder returns an Encoder for encoding into an io.Writer.
+//
+// For efficiency, Users are encouraged to pass in a memory buffered writer
+// (eg bufio.Writer, bytes.Buffer).
+func NewEncoder(w io.Writer, h Handle) *Encoder {
+	e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()}
+	ww, ok := w.(ioEncWriterWriter)
+	if !ok {
+		sww := simpleIoEncWriterWriter{w: w}
+		sww.bw, _ = w.(io.ByteWriter)
+		sww.sw, _ = w.(ioEncStringWriter)
+		ww = &sww
+		//ww = bufio.NewWriterSize(w, defEncByteBufSize)
+	}
+	e.wi.w = ww
+	e.w = &e.wi
+	e.e = h.newEncDriver(e)
+	return e
+}
+
+// NewEncoderBytes returns an encoder for encoding directly and efficiently
+// into a byte slice, using zero-copying to temporary slices.
+//
+// It will potentially replace the output byte slice pointed to.
+// After encoding, the out parameter contains the encoded contents.
+func NewEncoderBytes(out *[]byte, h Handle) *Encoder {
+	e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()}
+	in := *out
+	if in == nil {
+		in = make([]byte, defEncByteBufSize)
+	}
+	e.wb.b, e.wb.out = in, out
+	e.w = &e.wb
+	e.e = h.newEncDriver(e)
+	return e
+}
+
+// Encode writes an object into a stream.
+//
+// Encoding can be configured via the struct tag for the fields.
+// The "codec" key in struct field's tag value is the key name,
+// followed by an optional comma and options.
+// Note that the "json" key is used in the absence of the "codec" key.
+//
+// To set an option on all fields (e.g. omitempty on all fields), you
+// can create a field called _struct, and set flags on it.
+//
+// Struct values "usually" encode as maps. Each exported struct field is encoded unless:
+//    - the field's tag is "-", OR
+//    - the field is empty (empty or the zero value) and its tag specifies the "omitempty" option.
+//
+// When encoding as a map, the first string in the tag (before the comma)
+// is the map key string to use when encoding.
+//
+// However, struct values may encode as arrays. This happens when:
+//    - StructToArray Encode option is set, OR
+//    - the tag on the _struct field sets the "toarray" option
+//
+// Values with types that implement MapBySlice are encoded as stream maps.
+//
+// The empty values (for omitempty option) are false, 0, any nil pointer
+// or interface value, and any array, slice, map, or string of length zero.
+//
+// Anonymous fields are encoded inline if no struct tag is present.
+// Else they are encoded as regular fields.
+//
+// Examples:
+//
+//      // NOTE: 'json:' can be used as struct tag key, in place 'codec:' below.
+//      type MyStruct struct {
+//          _struct bool    `codec:",omitempty"`   //set omitempty for every field
+//          Field1 string   `codec:"-"`            //skip this field
+//          Field2 int      `codec:"myName"`       //Use key "myName" in encode stream
+//          Field3 int32    `codec:",omitempty"`   //use key "Field3". Omit if empty.
+//          Field4 bool     `codec:"f4,omitempty"` //use key "f4". Omit if empty.
+//          ...
+//      }
+//
+//      type MyStruct struct {
+//          _struct bool    `codec:",omitempty,toarray"`   //set omitempty for every field
+//                                                         //and encode struct as an array
+//      }
+//
+// The mode of encoding is based on the type of the value. When a value is seen:
+//   - If an extension is registered for it, call that extension function
+//   - If it implements BinaryMarshaler, call its MarshalBinary() (data []byte, err error)
+//   - Else encode it based on its reflect.Kind
+//
+// Note that struct field names and keys in map[string]XXX will be treated as symbols.
+// Some formats support symbols (e.g. binc) and will properly encode the string
+// only once in the stream, and use a tag to refer to it thereafter.
+func (e *Encoder) Encode(v interface{}) (err error) {
+	defer panicToErr(&err)
+	e.encode(v)
+	e.w.atEndOfEncode()
+	return
+}
+
+// MustEncode is like Encode, but panics if unable to Encode.
+// This provides insight to the code location that triggered the error.
+func (e *Encoder) MustEncode(v interface{}) {
+	e.encode(v)
+	e.w.atEndOfEncode()
+}
+
+// comment out these (Must)Write methods. They were only put there to support cbor.
+// However, users already have access to the streams, and can write directly.
+//
+// // Write allows users write to the Encoder stream directly.
+// func (e *Encoder) Write(bs []byte) (err error) {
+// 	defer panicToErr(&err)
+// 	e.w.writeb(bs)
+// 	return
+// }
+// // MustWrite is like write, but panics if unable to Write.
+// func (e *Encoder) MustWrite(bs []byte) {
+// 	e.w.writeb(bs)
+// }
+
+func (e *Encoder) encode(iv interface{}) {
+	// if ics, ok := iv.(Selfer); ok {
+	// 	ics.CodecEncodeSelf(e)
+	// 	return
+	// }
+
+	switch v := iv.(type) {
+	case nil:
+		e.e.EncodeNil()
+	case Selfer:
+		v.CodecEncodeSelf(e)
+
+	case reflect.Value:
+		e.encodeValue(v, encFn{})
+
+	case string:
+		e.e.EncodeString(c_UTF8, v)
+	case bool:
+		e.e.EncodeBool(v)
+	case int:
+		e.e.EncodeInt(int64(v))
+	case int8:
+		e.e.EncodeInt(int64(v))
+	case int16:
+		e.e.EncodeInt(int64(v))
+	case int32:
+		e.e.EncodeInt(int64(v))
+	case int64:
+		e.e.EncodeInt(v)
+	case uint:
+		e.e.EncodeUint(uint64(v))
+	case uint8:
+		e.e.EncodeUint(uint64(v))
+	case uint16:
+		e.e.EncodeUint(uint64(v))
+	case uint32:
+		e.e.EncodeUint(uint64(v))
+	case uint64:
+		e.e.EncodeUint(v)
+	case float32:
+		e.e.EncodeFloat32(v)
+	case float64:
+		e.e.EncodeFloat64(v)
+
+	case []uint8:
+		e.e.EncodeStringBytes(c_RAW, v)
+
+	case *string:
+		e.e.EncodeString(c_UTF8, *v)
+	case *bool:
+		e.e.EncodeBool(*v)
+	case *int:
+		e.e.EncodeInt(int64(*v))
+	case *int8:
+		e.e.EncodeInt(int64(*v))
+	case *int16:
+		e.e.EncodeInt(int64(*v))
+	case *int32:
+		e.e.EncodeInt(int64(*v))
+	case *int64:
+		e.e.EncodeInt(*v)
+	case *uint:
+		e.e.EncodeUint(uint64(*v))
+	case *uint8:
+		e.e.EncodeUint(uint64(*v))
+	case *uint16:
+		e.e.EncodeUint(uint64(*v))
+	case *uint32:
+		e.e.EncodeUint(uint64(*v))
+	case *uint64:
+		e.e.EncodeUint(*v)
+	case *float32:
+		e.e.EncodeFloat32(*v)
+	case *float64:
+		e.e.EncodeFloat64(*v)
+
+	case *[]uint8:
+		e.e.EncodeStringBytes(c_RAW, *v)
+
+	default:
+		// canonical mode is not supported for fastpath of maps (but is fine for slices)
+		if e.h.Canonical {
+			if !fastpathEncodeTypeSwitchSlice(iv, e) {
+				e.encodeI(iv, false, false)
+			}
+		} else if !fastpathEncodeTypeSwitch(iv, e) {
+			e.encodeI(iv, false, false)
+		}
+	}
+}
+
+func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) {
+	if rv, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed {
+		rt := rv.Type()
+		rtid := reflect.ValueOf(rt).Pointer()
+		fn := e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer)
+		fn.f(fn.i, rv)
+	}
+}
+
+func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, proceed bool) {
+LOOP:
+	for {
+		switch rv.Kind() {
+		case reflect.Ptr, reflect.Interface:
+			if rv.IsNil() {
+				e.e.EncodeNil()
+				return
+			}
+			rv = rv.Elem()
+			continue LOOP
+		case reflect.Slice, reflect.Map:
+			if rv.IsNil() {
+				e.e.EncodeNil()
+				return
+			}
+		case reflect.Invalid, reflect.Func:
+			e.e.EncodeNil()
+			return
+		}
+		break
+	}
+
+	return rv, true
+}
+
+func (e *Encoder) encodeValue(rv reflect.Value, fn encFn) {
+	// if a valid fn is passed, it MUST BE for the dereferenced type of rv
+	if rv, proceed := e.preEncodeValue(rv); proceed {
+		if fn.f == nil {
+			rt := rv.Type()
+			rtid := reflect.ValueOf(rt).Pointer()
+			fn = e.getEncFn(rtid, rt, true, true)
+		}
+		fn.f(fn.i, rv)
+	}
+}
+
+func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn encFn) {
+	// rtid := reflect.ValueOf(rt).Pointer()
+	var ok bool
+	if useMapForCodecCache {
+		fn, ok = e.f[rtid]
+	} else {
+		for _, v := range e.s {
+			if v.rtid == rtid {
+				fn, ok = v.fn, true
+				break
+			}
+		}
+	}
+	if ok {
+		return
+	}
+	// fi.encFnInfoX = new(encFnInfoX)
+	ti := getTypeInfo(rtid, rt)
+	var fi encFnInfo
+	fi.ee = e.e
+
+	if checkCodecSelfer && ti.cs {
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fn.f = (encFnInfo).selferMarshal
+	} else if rtid == rawExtTypId {
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fn.f = (encFnInfo).rawExt
+	} else if e.e.IsBuiltinType(rtid) {
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fn.f = (encFnInfo).builtin
+	} else if xfFn := e.h.getExt(rtid); xfFn != nil {
+		// fi.encFnInfoX = new(encFnInfoX)
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext
+		fn.f = (encFnInfo).ext
+	} else if supportMarshalInterfaces && e.be && ti.bm {
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fn.f = (encFnInfo).binaryMarshal
+	} else if supportMarshalInterfaces && !e.be && ti.tm {
+		fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+		fn.f = (encFnInfo).textMarshal
+	} else {
+		rk := rt.Kind()
+		if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) {
+			if rt.PkgPath() == "" {
+				if idx := fastpathAV.index(rtid); idx != -1 {
+					fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+					fn.f = fastpathAV[idx].encfn
+				}
+			} else {
+				ok = false
+				// use mapping for underlying type if there
+				var rtu reflect.Type
+				if rk == reflect.Map {
+					rtu = reflect.MapOf(rt.Key(), rt.Elem())
+				} else {
+					rtu = reflect.SliceOf(rt.Elem())
+				}
+				rtuid := reflect.ValueOf(rtu).Pointer()
+				if idx := fastpathAV.index(rtuid); idx != -1 {
+					xfnf := fastpathAV[idx].encfn
+					xrt := fastpathAV[idx].rt
+					fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+					fn.f = func(xf encFnInfo, xrv reflect.Value) {
+						xfnf(xf, xrv.Convert(xrt))
+					}
+				}
+			}
+		}
+		if fn.f == nil {
+			switch rk {
+			case reflect.Bool:
+				fn.f = (encFnInfo).kBool
+			case reflect.String:
+				fn.f = (encFnInfo).kString
+			case reflect.Float64:
+				fn.f = (encFnInfo).kFloat64
+			case reflect.Float32:
+				fn.f = (encFnInfo).kFloat32
+			case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16:
+				fn.f = (encFnInfo).kInt
+			case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16:
+				fn.f = (encFnInfo).kUint
+			case reflect.Invalid:
+				fn.f = (encFnInfo).kInvalid
+			case reflect.Chan:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeChan}
+				fn.f = (encFnInfo).kSlice
+			case reflect.Slice:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeSlice}
+				fn.f = (encFnInfo).kSlice
+			case reflect.Array:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeArray}
+				fn.f = (encFnInfo).kSlice
+			case reflect.Struct:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+				fn.f = (encFnInfo).kStruct
+				// case reflect.Ptr:
+				// 	fn.f = (encFnInfo).kPtr
+			case reflect.Interface:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+				fn.f = (encFnInfo).kInterface
+			case reflect.Map:
+				fi.encFnInfoX = &encFnInfoX{e: e, ti: ti}
+				fn.f = (encFnInfo).kMap
+			default:
+				fn.f = (encFnInfo).kErr
+			}
+		}
+	}
+	fn.i = fi
+
+	if useMapForCodecCache {
+		if e.f == nil {
+			e.f = make(map[uintptr]encFn, 32)
+		}
+		e.f[rtid] = fn
+	} else {
+		if e.s == nil {
+			e.s = make([]rtidEncFn, 0, 32)
+		}
+		e.s = append(e.s, rtidEncFn{rtid, fn})
+	}
+	return
+}
+
+func (e *Encoder) errorf(format string, params ...interface{}) {
+	err := fmt.Errorf(format, params...)
+	panic(err)
+}
+
+// ----------------------------------------
+
+type encStructFieldKV struct {
+	k string
+	v reflect.Value
+}
+
+const encStructPoolLen = 4
+
+// encStructPool is an array of sync.Pool.
+// Each element of the array pools one of encStructPool(8|16|32|64).
+// It allows the re-use of slices up to 64 in length.
+// A performance cost of encoding structs was collecting
+// which values were empty and should be omitted.
+// We needed slices of reflect.Value and string to collect them.
+// This shared pool reduces the amount of unnecessary creation we do.
+// The cost is that of locking sometimes, but sync.Pool is efficient
+// enough to reduce thread contention.
+var encStructPool [encStructPoolLen]sync.Pool
+
+func init() {
+	encStructPool[0].New = func() interface{} { return new([8]encStructFieldKV) }
+	encStructPool[1].New = func() interface{} { return new([16]encStructFieldKV) }
+	encStructPool[2].New = func() interface{} { return new([32]encStructFieldKV) }
+	encStructPool[3].New = func() interface{} { return new([64]encStructFieldKV) }
+}
+
+// ----------------------------------------
+
+// func encErr(format string, params ...interface{}) {
+// 	doPanic(msgTagEnc, format, params...)
+// }

+ 28307 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go

@@ -0,0 +1,28307 @@
+// //+build ignore
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl
+// ************************************************************
+
+package codec
+
+// Fast path functions try to create a fast path encode or decode implementation
+// for common maps and slices.
+//
+// We define the functions and register then in this single file
+// so as not to pollute the encode.go and decode.go, and create a dependency in there.
+// This file can be omitted without causing a build failure.
+//
+// The advantage of fast paths is:
+//    - Many calls bypass reflection altogether
+//
+// Currently support
+//    - slice of all builtin types,
+//    - map of all builtin types to string or interface value
+//    - symetrical maps of all builtin types (e.g. str-str, uint8-uint8)
+// This should provide adequate "typical" implementations.
+//
+// Note that fast track decode functions must handle values for which an address cannot be obtained.
+// For example:
+//   m2 := map[string]int{}
+//   p2 := []interface{}{m2}
+//   // decoding into p2 will bomb if fast track functions do not treat like unaddressable.
+//
+
+import (
+	"reflect"
+	"sort"
+)
+
+const fastpathCheckNilFalse = false // for reflect
+const fastpathCheckNilTrue = true   // for type switch
+
+type fastpathT struct{}
+
+var fastpathTV fastpathT
+
+type fastpathE struct {
+	rtid  uintptr
+	rt    reflect.Type
+	encfn func(encFnInfo, reflect.Value)
+	decfn func(decFnInfo, reflect.Value)
+}
+
+type fastpathA [239]fastpathE
+
+func (x *fastpathA) index(rtid uintptr) int {
+	// use binary search to grab the index (adapted from sort/search.go)
+	h, i, j := 0, 0, 239 // len(x)
+	for i < j {
+		h = i + (j-i)/2
+		if x[h].rtid < rtid {
+			i = h + 1
+		} else {
+			j = h
+		}
+	}
+	if i < 239 && x[i].rtid == rtid {
+		return i
+	}
+	return -1
+}
+
+type fastpathAslice []fastpathE
+
+func (x fastpathAslice) Len() int           { return len(x) }
+func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid }
+func (x fastpathAslice) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }
+
+var fastpathAV fastpathA
+
+// due to possible initialization loop error, make fastpath in an init()
+func init() {
+	if !fastpathEnabled {
+		return
+	}
+	i := 0
+	fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) {
+		xrt := reflect.TypeOf(v)
+		xptr := reflect.ValueOf(xrt).Pointer()
+		fastpathAV[i] = fastpathE{xptr, xrt, fe, fd}
+		i++
+		return
+	}
+
+	fn([]interface{}(nil), (encFnInfo).fastpathEncSliceIntfR, (decFnInfo).fastpathDecSliceIntfR)
+	fn([]string(nil), (encFnInfo).fastpathEncSliceStringR, (decFnInfo).fastpathDecSliceStringR)
+	fn([]float32(nil), (encFnInfo).fastpathEncSliceFloat32R, (decFnInfo).fastpathDecSliceFloat32R)
+	fn([]float64(nil), (encFnInfo).fastpathEncSliceFloat64R, (decFnInfo).fastpathDecSliceFloat64R)
+	fn([]uint(nil), (encFnInfo).fastpathEncSliceUintR, (decFnInfo).fastpathDecSliceUintR)
+	fn([]uint16(nil), (encFnInfo).fastpathEncSliceUint16R, (decFnInfo).fastpathDecSliceUint16R)
+	fn([]uint32(nil), (encFnInfo).fastpathEncSliceUint32R, (decFnInfo).fastpathDecSliceUint32R)
+	fn([]uint64(nil), (encFnInfo).fastpathEncSliceUint64R, (decFnInfo).fastpathDecSliceUint64R)
+	fn([]int(nil), (encFnInfo).fastpathEncSliceIntR, (decFnInfo).fastpathDecSliceIntR)
+	fn([]int8(nil), (encFnInfo).fastpathEncSliceInt8R, (decFnInfo).fastpathDecSliceInt8R)
+	fn([]int16(nil), (encFnInfo).fastpathEncSliceInt16R, (decFnInfo).fastpathDecSliceInt16R)
+	fn([]int32(nil), (encFnInfo).fastpathEncSliceInt32R, (decFnInfo).fastpathDecSliceInt32R)
+	fn([]int64(nil), (encFnInfo).fastpathEncSliceInt64R, (decFnInfo).fastpathDecSliceInt64R)
+	fn([]bool(nil), (encFnInfo).fastpathEncSliceBoolR, (decFnInfo).fastpathDecSliceBoolR)
+
+	fn(map[interface{}]interface{}(nil), (encFnInfo).fastpathEncMapIntfIntfR, (decFnInfo).fastpathDecMapIntfIntfR)
+	fn(map[interface{}]string(nil), (encFnInfo).fastpathEncMapIntfStringR, (decFnInfo).fastpathDecMapIntfStringR)
+	fn(map[interface{}]uint(nil), (encFnInfo).fastpathEncMapIntfUintR, (decFnInfo).fastpathDecMapIntfUintR)
+	fn(map[interface{}]uint8(nil), (encFnInfo).fastpathEncMapIntfUint8R, (decFnInfo).fastpathDecMapIntfUint8R)
+	fn(map[interface{}]uint16(nil), (encFnInfo).fastpathEncMapIntfUint16R, (decFnInfo).fastpathDecMapIntfUint16R)
+	fn(map[interface{}]uint32(nil), (encFnInfo).fastpathEncMapIntfUint32R, (decFnInfo).fastpathDecMapIntfUint32R)
+	fn(map[interface{}]uint64(nil), (encFnInfo).fastpathEncMapIntfUint64R, (decFnInfo).fastpathDecMapIntfUint64R)
+	fn(map[interface{}]int(nil), (encFnInfo).fastpathEncMapIntfIntR, (decFnInfo).fastpathDecMapIntfIntR)
+	fn(map[interface{}]int8(nil), (encFnInfo).fastpathEncMapIntfInt8R, (decFnInfo).fastpathDecMapIntfInt8R)
+	fn(map[interface{}]int16(nil), (encFnInfo).fastpathEncMapIntfInt16R, (decFnInfo).fastpathDecMapIntfInt16R)
+	fn(map[interface{}]int32(nil), (encFnInfo).fastpathEncMapIntfInt32R, (decFnInfo).fastpathDecMapIntfInt32R)
+	fn(map[interface{}]int64(nil), (encFnInfo).fastpathEncMapIntfInt64R, (decFnInfo).fastpathDecMapIntfInt64R)
+	fn(map[interface{}]float32(nil), (encFnInfo).fastpathEncMapIntfFloat32R, (decFnInfo).fastpathDecMapIntfFloat32R)
+	fn(map[interface{}]float64(nil), (encFnInfo).fastpathEncMapIntfFloat64R, (decFnInfo).fastpathDecMapIntfFloat64R)
+	fn(map[interface{}]bool(nil), (encFnInfo).fastpathEncMapIntfBoolR, (decFnInfo).fastpathDecMapIntfBoolR)
+	fn(map[string]interface{}(nil), (encFnInfo).fastpathEncMapStringIntfR, (decFnInfo).fastpathDecMapStringIntfR)
+	fn(map[string]string(nil), (encFnInfo).fastpathEncMapStringStringR, (decFnInfo).fastpathDecMapStringStringR)
+	fn(map[string]uint(nil), (encFnInfo).fastpathEncMapStringUintR, (decFnInfo).fastpathDecMapStringUintR)
+	fn(map[string]uint8(nil), (encFnInfo).fastpathEncMapStringUint8R, (decFnInfo).fastpathDecMapStringUint8R)
+	fn(map[string]uint16(nil), (encFnInfo).fastpathEncMapStringUint16R, (decFnInfo).fastpathDecMapStringUint16R)
+	fn(map[string]uint32(nil), (encFnInfo).fastpathEncMapStringUint32R, (decFnInfo).fastpathDecMapStringUint32R)
+	fn(map[string]uint64(nil), (encFnInfo).fastpathEncMapStringUint64R, (decFnInfo).fastpathDecMapStringUint64R)
+	fn(map[string]int(nil), (encFnInfo).fastpathEncMapStringIntR, (decFnInfo).fastpathDecMapStringIntR)
+	fn(map[string]int8(nil), (encFnInfo).fastpathEncMapStringInt8R, (decFnInfo).fastpathDecMapStringInt8R)
+	fn(map[string]int16(nil), (encFnInfo).fastpathEncMapStringInt16R, (decFnInfo).fastpathDecMapStringInt16R)
+	fn(map[string]int32(nil), (encFnInfo).fastpathEncMapStringInt32R, (decFnInfo).fastpathDecMapStringInt32R)
+	fn(map[string]int64(nil), (encFnInfo).fastpathEncMapStringInt64R, (decFnInfo).fastpathDecMapStringInt64R)
+	fn(map[string]float32(nil), (encFnInfo).fastpathEncMapStringFloat32R, (decFnInfo).fastpathDecMapStringFloat32R)
+	fn(map[string]float64(nil), (encFnInfo).fastpathEncMapStringFloat64R, (decFnInfo).fastpathDecMapStringFloat64R)
+	fn(map[string]bool(nil), (encFnInfo).fastpathEncMapStringBoolR, (decFnInfo).fastpathDecMapStringBoolR)
+	fn(map[float32]interface{}(nil), (encFnInfo).fastpathEncMapFloat32IntfR, (decFnInfo).fastpathDecMapFloat32IntfR)
+	fn(map[float32]string(nil), (encFnInfo).fastpathEncMapFloat32StringR, (decFnInfo).fastpathDecMapFloat32StringR)
+	fn(map[float32]uint(nil), (encFnInfo).fastpathEncMapFloat32UintR, (decFnInfo).fastpathDecMapFloat32UintR)
+	fn(map[float32]uint8(nil), (encFnInfo).fastpathEncMapFloat32Uint8R, (decFnInfo).fastpathDecMapFloat32Uint8R)
+	fn(map[float32]uint16(nil), (encFnInfo).fastpathEncMapFloat32Uint16R, (decFnInfo).fastpathDecMapFloat32Uint16R)
+	fn(map[float32]uint32(nil), (encFnInfo).fastpathEncMapFloat32Uint32R, (decFnInfo).fastpathDecMapFloat32Uint32R)
+	fn(map[float32]uint64(nil), (encFnInfo).fastpathEncMapFloat32Uint64R, (decFnInfo).fastpathDecMapFloat32Uint64R)
+	fn(map[float32]int(nil), (encFnInfo).fastpathEncMapFloat32IntR, (decFnInfo).fastpathDecMapFloat32IntR)
+	fn(map[float32]int8(nil), (encFnInfo).fastpathEncMapFloat32Int8R, (decFnInfo).fastpathDecMapFloat32Int8R)
+	fn(map[float32]int16(nil), (encFnInfo).fastpathEncMapFloat32Int16R, (decFnInfo).fastpathDecMapFloat32Int16R)
+	fn(map[float32]int32(nil), (encFnInfo).fastpathEncMapFloat32Int32R, (decFnInfo).fastpathDecMapFloat32Int32R)
+	fn(map[float32]int64(nil), (encFnInfo).fastpathEncMapFloat32Int64R, (decFnInfo).fastpathDecMapFloat32Int64R)
+	fn(map[float32]float32(nil), (encFnInfo).fastpathEncMapFloat32Float32R, (decFnInfo).fastpathDecMapFloat32Float32R)
+	fn(map[float32]float64(nil), (encFnInfo).fastpathEncMapFloat32Float64R, (decFnInfo).fastpathDecMapFloat32Float64R)
+	fn(map[float32]bool(nil), (encFnInfo).fastpathEncMapFloat32BoolR, (decFnInfo).fastpathDecMapFloat32BoolR)
+	fn(map[float64]interface{}(nil), (encFnInfo).fastpathEncMapFloat64IntfR, (decFnInfo).fastpathDecMapFloat64IntfR)
+	fn(map[float64]string(nil), (encFnInfo).fastpathEncMapFloat64StringR, (decFnInfo).fastpathDecMapFloat64StringR)
+	fn(map[float64]uint(nil), (encFnInfo).fastpathEncMapFloat64UintR, (decFnInfo).fastpathDecMapFloat64UintR)
+	fn(map[float64]uint8(nil), (encFnInfo).fastpathEncMapFloat64Uint8R, (decFnInfo).fastpathDecMapFloat64Uint8R)
+	fn(map[float64]uint16(nil), (encFnInfo).fastpathEncMapFloat64Uint16R, (decFnInfo).fastpathDecMapFloat64Uint16R)
+	fn(map[float64]uint32(nil), (encFnInfo).fastpathEncMapFloat64Uint32R, (decFnInfo).fastpathDecMapFloat64Uint32R)
+	fn(map[float64]uint64(nil), (encFnInfo).fastpathEncMapFloat64Uint64R, (decFnInfo).fastpathDecMapFloat64Uint64R)
+	fn(map[float64]int(nil), (encFnInfo).fastpathEncMapFloat64IntR, (decFnInfo).fastpathDecMapFloat64IntR)
+	fn(map[float64]int8(nil), (encFnInfo).fastpathEncMapFloat64Int8R, (decFnInfo).fastpathDecMapFloat64Int8R)
+	fn(map[float64]int16(nil), (encFnInfo).fastpathEncMapFloat64Int16R, (decFnInfo).fastpathDecMapFloat64Int16R)
+	fn(map[float64]int32(nil), (encFnInfo).fastpathEncMapFloat64Int32R, (decFnInfo).fastpathDecMapFloat64Int32R)
+	fn(map[float64]int64(nil), (encFnInfo).fastpathEncMapFloat64Int64R, (decFnInfo).fastpathDecMapFloat64Int64R)
+	fn(map[float64]float32(nil), (encFnInfo).fastpathEncMapFloat64Float32R, (decFnInfo).fastpathDecMapFloat64Float32R)
+	fn(map[float64]float64(nil), (encFnInfo).fastpathEncMapFloat64Float64R, (decFnInfo).fastpathDecMapFloat64Float64R)
+	fn(map[float64]bool(nil), (encFnInfo).fastpathEncMapFloat64BoolR, (decFnInfo).fastpathDecMapFloat64BoolR)
+	fn(map[uint]interface{}(nil), (encFnInfo).fastpathEncMapUintIntfR, (decFnInfo).fastpathDecMapUintIntfR)
+	fn(map[uint]string(nil), (encFnInfo).fastpathEncMapUintStringR, (decFnInfo).fastpathDecMapUintStringR)
+	fn(map[uint]uint(nil), (encFnInfo).fastpathEncMapUintUintR, (decFnInfo).fastpathDecMapUintUintR)
+	fn(map[uint]uint8(nil), (encFnInfo).fastpathEncMapUintUint8R, (decFnInfo).fastpathDecMapUintUint8R)
+	fn(map[uint]uint16(nil), (encFnInfo).fastpathEncMapUintUint16R, (decFnInfo).fastpathDecMapUintUint16R)
+	fn(map[uint]uint32(nil), (encFnInfo).fastpathEncMapUintUint32R, (decFnInfo).fastpathDecMapUintUint32R)
+	fn(map[uint]uint64(nil), (encFnInfo).fastpathEncMapUintUint64R, (decFnInfo).fastpathDecMapUintUint64R)
+	fn(map[uint]int(nil), (encFnInfo).fastpathEncMapUintIntR, (decFnInfo).fastpathDecMapUintIntR)
+	fn(map[uint]int8(nil), (encFnInfo).fastpathEncMapUintInt8R, (decFnInfo).fastpathDecMapUintInt8R)
+	fn(map[uint]int16(nil), (encFnInfo).fastpathEncMapUintInt16R, (decFnInfo).fastpathDecMapUintInt16R)
+	fn(map[uint]int32(nil), (encFnInfo).fastpathEncMapUintInt32R, (decFnInfo).fastpathDecMapUintInt32R)
+	fn(map[uint]int64(nil), (encFnInfo).fastpathEncMapUintInt64R, (decFnInfo).fastpathDecMapUintInt64R)
+	fn(map[uint]float32(nil), (encFnInfo).fastpathEncMapUintFloat32R, (decFnInfo).fastpathDecMapUintFloat32R)
+	fn(map[uint]float64(nil), (encFnInfo).fastpathEncMapUintFloat64R, (decFnInfo).fastpathDecMapUintFloat64R)
+	fn(map[uint]bool(nil), (encFnInfo).fastpathEncMapUintBoolR, (decFnInfo).fastpathDecMapUintBoolR)
+	fn(map[uint8]interface{}(nil), (encFnInfo).fastpathEncMapUint8IntfR, (decFnInfo).fastpathDecMapUint8IntfR)
+	fn(map[uint8]string(nil), (encFnInfo).fastpathEncMapUint8StringR, (decFnInfo).fastpathDecMapUint8StringR)
+	fn(map[uint8]uint(nil), (encFnInfo).fastpathEncMapUint8UintR, (decFnInfo).fastpathDecMapUint8UintR)
+	fn(map[uint8]uint8(nil), (encFnInfo).fastpathEncMapUint8Uint8R, (decFnInfo).fastpathDecMapUint8Uint8R)
+	fn(map[uint8]uint16(nil), (encFnInfo).fastpathEncMapUint8Uint16R, (decFnInfo).fastpathDecMapUint8Uint16R)
+	fn(map[uint8]uint32(nil), (encFnInfo).fastpathEncMapUint8Uint32R, (decFnInfo).fastpathDecMapUint8Uint32R)
+	fn(map[uint8]uint64(nil), (encFnInfo).fastpathEncMapUint8Uint64R, (decFnInfo).fastpathDecMapUint8Uint64R)
+	fn(map[uint8]int(nil), (encFnInfo).fastpathEncMapUint8IntR, (decFnInfo).fastpathDecMapUint8IntR)
+	fn(map[uint8]int8(nil), (encFnInfo).fastpathEncMapUint8Int8R, (decFnInfo).fastpathDecMapUint8Int8R)
+	fn(map[uint8]int16(nil), (encFnInfo).fastpathEncMapUint8Int16R, (decFnInfo).fastpathDecMapUint8Int16R)
+	fn(map[uint8]int32(nil), (encFnInfo).fastpathEncMapUint8Int32R, (decFnInfo).fastpathDecMapUint8Int32R)
+	fn(map[uint8]int64(nil), (encFnInfo).fastpathEncMapUint8Int64R, (decFnInfo).fastpathDecMapUint8Int64R)
+	fn(map[uint8]float32(nil), (encFnInfo).fastpathEncMapUint8Float32R, (decFnInfo).fastpathDecMapUint8Float32R)
+	fn(map[uint8]float64(nil), (encFnInfo).fastpathEncMapUint8Float64R, (decFnInfo).fastpathDecMapUint8Float64R)
+	fn(map[uint8]bool(nil), (encFnInfo).fastpathEncMapUint8BoolR, (decFnInfo).fastpathDecMapUint8BoolR)
+	fn(map[uint16]interface{}(nil), (encFnInfo).fastpathEncMapUint16IntfR, (decFnInfo).fastpathDecMapUint16IntfR)
+	fn(map[uint16]string(nil), (encFnInfo).fastpathEncMapUint16StringR, (decFnInfo).fastpathDecMapUint16StringR)
+	fn(map[uint16]uint(nil), (encFnInfo).fastpathEncMapUint16UintR, (decFnInfo).fastpathDecMapUint16UintR)
+	fn(map[uint16]uint8(nil), (encFnInfo).fastpathEncMapUint16Uint8R, (decFnInfo).fastpathDecMapUint16Uint8R)
+	fn(map[uint16]uint16(nil), (encFnInfo).fastpathEncMapUint16Uint16R, (decFnInfo).fastpathDecMapUint16Uint16R)
+	fn(map[uint16]uint32(nil), (encFnInfo).fastpathEncMapUint16Uint32R, (decFnInfo).fastpathDecMapUint16Uint32R)
+	fn(map[uint16]uint64(nil), (encFnInfo).fastpathEncMapUint16Uint64R, (decFnInfo).fastpathDecMapUint16Uint64R)
+	fn(map[uint16]int(nil), (encFnInfo).fastpathEncMapUint16IntR, (decFnInfo).fastpathDecMapUint16IntR)
+	fn(map[uint16]int8(nil), (encFnInfo).fastpathEncMapUint16Int8R, (decFnInfo).fastpathDecMapUint16Int8R)
+	fn(map[uint16]int16(nil), (encFnInfo).fastpathEncMapUint16Int16R, (decFnInfo).fastpathDecMapUint16Int16R)
+	fn(map[uint16]int32(nil), (encFnInfo).fastpathEncMapUint16Int32R, (decFnInfo).fastpathDecMapUint16Int32R)
+	fn(map[uint16]int64(nil), (encFnInfo).fastpathEncMapUint16Int64R, (decFnInfo).fastpathDecMapUint16Int64R)
+	fn(map[uint16]float32(nil), (encFnInfo).fastpathEncMapUint16Float32R, (decFnInfo).fastpathDecMapUint16Float32R)
+	fn(map[uint16]float64(nil), (encFnInfo).fastpathEncMapUint16Float64R, (decFnInfo).fastpathDecMapUint16Float64R)
+	fn(map[uint16]bool(nil), (encFnInfo).fastpathEncMapUint16BoolR, (decFnInfo).fastpathDecMapUint16BoolR)
+	fn(map[uint32]interface{}(nil), (encFnInfo).fastpathEncMapUint32IntfR, (decFnInfo).fastpathDecMapUint32IntfR)
+	fn(map[uint32]string(nil), (encFnInfo).fastpathEncMapUint32StringR, (decFnInfo).fastpathDecMapUint32StringR)
+	fn(map[uint32]uint(nil), (encFnInfo).fastpathEncMapUint32UintR, (decFnInfo).fastpathDecMapUint32UintR)
+	fn(map[uint32]uint8(nil), (encFnInfo).fastpathEncMapUint32Uint8R, (decFnInfo).fastpathDecMapUint32Uint8R)
+	fn(map[uint32]uint16(nil), (encFnInfo).fastpathEncMapUint32Uint16R, (decFnInfo).fastpathDecMapUint32Uint16R)
+	fn(map[uint32]uint32(nil), (encFnInfo).fastpathEncMapUint32Uint32R, (decFnInfo).fastpathDecMapUint32Uint32R)
+	fn(map[uint32]uint64(nil), (encFnInfo).fastpathEncMapUint32Uint64R, (decFnInfo).fastpathDecMapUint32Uint64R)
+	fn(map[uint32]int(nil), (encFnInfo).fastpathEncMapUint32IntR, (decFnInfo).fastpathDecMapUint32IntR)
+	fn(map[uint32]int8(nil), (encFnInfo).fastpathEncMapUint32Int8R, (decFnInfo).fastpathDecMapUint32Int8R)
+	fn(map[uint32]int16(nil), (encFnInfo).fastpathEncMapUint32Int16R, (decFnInfo).fastpathDecMapUint32Int16R)
+	fn(map[uint32]int32(nil), (encFnInfo).fastpathEncMapUint32Int32R, (decFnInfo).fastpathDecMapUint32Int32R)
+	fn(map[uint32]int64(nil), (encFnInfo).fastpathEncMapUint32Int64R, (decFnInfo).fastpathDecMapUint32Int64R)
+	fn(map[uint32]float32(nil), (encFnInfo).fastpathEncMapUint32Float32R, (decFnInfo).fastpathDecMapUint32Float32R)
+	fn(map[uint32]float64(nil), (encFnInfo).fastpathEncMapUint32Float64R, (decFnInfo).fastpathDecMapUint32Float64R)
+	fn(map[uint32]bool(nil), (encFnInfo).fastpathEncMapUint32BoolR, (decFnInfo).fastpathDecMapUint32BoolR)
+	fn(map[uint64]interface{}(nil), (encFnInfo).fastpathEncMapUint64IntfR, (decFnInfo).fastpathDecMapUint64IntfR)
+	fn(map[uint64]string(nil), (encFnInfo).fastpathEncMapUint64StringR, (decFnInfo).fastpathDecMapUint64StringR)
+	fn(map[uint64]uint(nil), (encFnInfo).fastpathEncMapUint64UintR, (decFnInfo).fastpathDecMapUint64UintR)
+	fn(map[uint64]uint8(nil), (encFnInfo).fastpathEncMapUint64Uint8R, (decFnInfo).fastpathDecMapUint64Uint8R)
+	fn(map[uint64]uint16(nil), (encFnInfo).fastpathEncMapUint64Uint16R, (decFnInfo).fastpathDecMapUint64Uint16R)
+	fn(map[uint64]uint32(nil), (encFnInfo).fastpathEncMapUint64Uint32R, (decFnInfo).fastpathDecMapUint64Uint32R)
+	fn(map[uint64]uint64(nil), (encFnInfo).fastpathEncMapUint64Uint64R, (decFnInfo).fastpathDecMapUint64Uint64R)
+	fn(map[uint64]int(nil), (encFnInfo).fastpathEncMapUint64IntR, (decFnInfo).fastpathDecMapUint64IntR)
+	fn(map[uint64]int8(nil), (encFnInfo).fastpathEncMapUint64Int8R, (decFnInfo).fastpathDecMapUint64Int8R)
+	fn(map[uint64]int16(nil), (encFnInfo).fastpathEncMapUint64Int16R, (decFnInfo).fastpathDecMapUint64Int16R)
+	fn(map[uint64]int32(nil), (encFnInfo).fastpathEncMapUint64Int32R, (decFnInfo).fastpathDecMapUint64Int32R)
+	fn(map[uint64]int64(nil), (encFnInfo).fastpathEncMapUint64Int64R, (decFnInfo).fastpathDecMapUint64Int64R)
+	fn(map[uint64]float32(nil), (encFnInfo).fastpathEncMapUint64Float32R, (decFnInfo).fastpathDecMapUint64Float32R)
+	fn(map[uint64]float64(nil), (encFnInfo).fastpathEncMapUint64Float64R, (decFnInfo).fastpathDecMapUint64Float64R)
+	fn(map[uint64]bool(nil), (encFnInfo).fastpathEncMapUint64BoolR, (decFnInfo).fastpathDecMapUint64BoolR)
+	fn(map[int]interface{}(nil), (encFnInfo).fastpathEncMapIntIntfR, (decFnInfo).fastpathDecMapIntIntfR)
+	fn(map[int]string(nil), (encFnInfo).fastpathEncMapIntStringR, (decFnInfo).fastpathDecMapIntStringR)
+	fn(map[int]uint(nil), (encFnInfo).fastpathEncMapIntUintR, (decFnInfo).fastpathDecMapIntUintR)
+	fn(map[int]uint8(nil), (encFnInfo).fastpathEncMapIntUint8R, (decFnInfo).fastpathDecMapIntUint8R)
+	fn(map[int]uint16(nil), (encFnInfo).fastpathEncMapIntUint16R, (decFnInfo).fastpathDecMapIntUint16R)
+	fn(map[int]uint32(nil), (encFnInfo).fastpathEncMapIntUint32R, (decFnInfo).fastpathDecMapIntUint32R)
+	fn(map[int]uint64(nil), (encFnInfo).fastpathEncMapIntUint64R, (decFnInfo).fastpathDecMapIntUint64R)
+	fn(map[int]int(nil), (encFnInfo).fastpathEncMapIntIntR, (decFnInfo).fastpathDecMapIntIntR)
+	fn(map[int]int8(nil), (encFnInfo).fastpathEncMapIntInt8R, (decFnInfo).fastpathDecMapIntInt8R)
+	fn(map[int]int16(nil), (encFnInfo).fastpathEncMapIntInt16R, (decFnInfo).fastpathDecMapIntInt16R)
+	fn(map[int]int32(nil), (encFnInfo).fastpathEncMapIntInt32R, (decFnInfo).fastpathDecMapIntInt32R)
+	fn(map[int]int64(nil), (encFnInfo).fastpathEncMapIntInt64R, (decFnInfo).fastpathDecMapIntInt64R)
+	fn(map[int]float32(nil), (encFnInfo).fastpathEncMapIntFloat32R, (decFnInfo).fastpathDecMapIntFloat32R)
+	fn(map[int]float64(nil), (encFnInfo).fastpathEncMapIntFloat64R, (decFnInfo).fastpathDecMapIntFloat64R)
+	fn(map[int]bool(nil), (encFnInfo).fastpathEncMapIntBoolR, (decFnInfo).fastpathDecMapIntBoolR)
+	fn(map[int8]interface{}(nil), (encFnInfo).fastpathEncMapInt8IntfR, (decFnInfo).fastpathDecMapInt8IntfR)
+	fn(map[int8]string(nil), (encFnInfo).fastpathEncMapInt8StringR, (decFnInfo).fastpathDecMapInt8StringR)
+	fn(map[int8]uint(nil), (encFnInfo).fastpathEncMapInt8UintR, (decFnInfo).fastpathDecMapInt8UintR)
+	fn(map[int8]uint8(nil), (encFnInfo).fastpathEncMapInt8Uint8R, (decFnInfo).fastpathDecMapInt8Uint8R)
+	fn(map[int8]uint16(nil), (encFnInfo).fastpathEncMapInt8Uint16R, (decFnInfo).fastpathDecMapInt8Uint16R)
+	fn(map[int8]uint32(nil), (encFnInfo).fastpathEncMapInt8Uint32R, (decFnInfo).fastpathDecMapInt8Uint32R)
+	fn(map[int8]uint64(nil), (encFnInfo).fastpathEncMapInt8Uint64R, (decFnInfo).fastpathDecMapInt8Uint64R)
+	fn(map[int8]int(nil), (encFnInfo).fastpathEncMapInt8IntR, (decFnInfo).fastpathDecMapInt8IntR)
+	fn(map[int8]int8(nil), (encFnInfo).fastpathEncMapInt8Int8R, (decFnInfo).fastpathDecMapInt8Int8R)
+	fn(map[int8]int16(nil), (encFnInfo).fastpathEncMapInt8Int16R, (decFnInfo).fastpathDecMapInt8Int16R)
+	fn(map[int8]int32(nil), (encFnInfo).fastpathEncMapInt8Int32R, (decFnInfo).fastpathDecMapInt8Int32R)
+	fn(map[int8]int64(nil), (encFnInfo).fastpathEncMapInt8Int64R, (decFnInfo).fastpathDecMapInt8Int64R)
+	fn(map[int8]float32(nil), (encFnInfo).fastpathEncMapInt8Float32R, (decFnInfo).fastpathDecMapInt8Float32R)
+	fn(map[int8]float64(nil), (encFnInfo).fastpathEncMapInt8Float64R, (decFnInfo).fastpathDecMapInt8Float64R)
+	fn(map[int8]bool(nil), (encFnInfo).fastpathEncMapInt8BoolR, (decFnInfo).fastpathDecMapInt8BoolR)
+	fn(map[int16]interface{}(nil), (encFnInfo).fastpathEncMapInt16IntfR, (decFnInfo).fastpathDecMapInt16IntfR)
+	fn(map[int16]string(nil), (encFnInfo).fastpathEncMapInt16StringR, (decFnInfo).fastpathDecMapInt16StringR)
+	fn(map[int16]uint(nil), (encFnInfo).fastpathEncMapInt16UintR, (decFnInfo).fastpathDecMapInt16UintR)
+	fn(map[int16]uint8(nil), (encFnInfo).fastpathEncMapInt16Uint8R, (decFnInfo).fastpathDecMapInt16Uint8R)
+	fn(map[int16]uint16(nil), (encFnInfo).fastpathEncMapInt16Uint16R, (decFnInfo).fastpathDecMapInt16Uint16R)
+	fn(map[int16]uint32(nil), (encFnInfo).fastpathEncMapInt16Uint32R, (decFnInfo).fastpathDecMapInt16Uint32R)
+	fn(map[int16]uint64(nil), (encFnInfo).fastpathEncMapInt16Uint64R, (decFnInfo).fastpathDecMapInt16Uint64R)
+	fn(map[int16]int(nil), (encFnInfo).fastpathEncMapInt16IntR, (decFnInfo).fastpathDecMapInt16IntR)
+	fn(map[int16]int8(nil), (encFnInfo).fastpathEncMapInt16Int8R, (decFnInfo).fastpathDecMapInt16Int8R)
+	fn(map[int16]int16(nil), (encFnInfo).fastpathEncMapInt16Int16R, (decFnInfo).fastpathDecMapInt16Int16R)
+	fn(map[int16]int32(nil), (encFnInfo).fastpathEncMapInt16Int32R, (decFnInfo).fastpathDecMapInt16Int32R)
+	fn(map[int16]int64(nil), (encFnInfo).fastpathEncMapInt16Int64R, (decFnInfo).fastpathDecMapInt16Int64R)
+	fn(map[int16]float32(nil), (encFnInfo).fastpathEncMapInt16Float32R, (decFnInfo).fastpathDecMapInt16Float32R)
+	fn(map[int16]float64(nil), (encFnInfo).fastpathEncMapInt16Float64R, (decFnInfo).fastpathDecMapInt16Float64R)
+	fn(map[int16]bool(nil), (encFnInfo).fastpathEncMapInt16BoolR, (decFnInfo).fastpathDecMapInt16BoolR)
+	fn(map[int32]interface{}(nil), (encFnInfo).fastpathEncMapInt32IntfR, (decFnInfo).fastpathDecMapInt32IntfR)
+	fn(map[int32]string(nil), (encFnInfo).fastpathEncMapInt32StringR, (decFnInfo).fastpathDecMapInt32StringR)
+	fn(map[int32]uint(nil), (encFnInfo).fastpathEncMapInt32UintR, (decFnInfo).fastpathDecMapInt32UintR)
+	fn(map[int32]uint8(nil), (encFnInfo).fastpathEncMapInt32Uint8R, (decFnInfo).fastpathDecMapInt32Uint8R)
+	fn(map[int32]uint16(nil), (encFnInfo).fastpathEncMapInt32Uint16R, (decFnInfo).fastpathDecMapInt32Uint16R)
+	fn(map[int32]uint32(nil), (encFnInfo).fastpathEncMapInt32Uint32R, (decFnInfo).fastpathDecMapInt32Uint32R)
+	fn(map[int32]uint64(nil), (encFnInfo).fastpathEncMapInt32Uint64R, (decFnInfo).fastpathDecMapInt32Uint64R)
+	fn(map[int32]int(nil), (encFnInfo).fastpathEncMapInt32IntR, (decFnInfo).fastpathDecMapInt32IntR)
+	fn(map[int32]int8(nil), (encFnInfo).fastpathEncMapInt32Int8R, (decFnInfo).fastpathDecMapInt32Int8R)
+	fn(map[int32]int16(nil), (encFnInfo).fastpathEncMapInt32Int16R, (decFnInfo).fastpathDecMapInt32Int16R)
+	fn(map[int32]int32(nil), (encFnInfo).fastpathEncMapInt32Int32R, (decFnInfo).fastpathDecMapInt32Int32R)
+	fn(map[int32]int64(nil), (encFnInfo).fastpathEncMapInt32Int64R, (decFnInfo).fastpathDecMapInt32Int64R)
+	fn(map[int32]float32(nil), (encFnInfo).fastpathEncMapInt32Float32R, (decFnInfo).fastpathDecMapInt32Float32R)
+	fn(map[int32]float64(nil), (encFnInfo).fastpathEncMapInt32Float64R, (decFnInfo).fastpathDecMapInt32Float64R)
+	fn(map[int32]bool(nil), (encFnInfo).fastpathEncMapInt32BoolR, (decFnInfo).fastpathDecMapInt32BoolR)
+	fn(map[int64]interface{}(nil), (encFnInfo).fastpathEncMapInt64IntfR, (decFnInfo).fastpathDecMapInt64IntfR)
+	fn(map[int64]string(nil), (encFnInfo).fastpathEncMapInt64StringR, (decFnInfo).fastpathDecMapInt64StringR)
+	fn(map[int64]uint(nil), (encFnInfo).fastpathEncMapInt64UintR, (decFnInfo).fastpathDecMapInt64UintR)
+	fn(map[int64]uint8(nil), (encFnInfo).fastpathEncMapInt64Uint8R, (decFnInfo).fastpathDecMapInt64Uint8R)
+	fn(map[int64]uint16(nil), (encFnInfo).fastpathEncMapInt64Uint16R, (decFnInfo).fastpathDecMapInt64Uint16R)
+	fn(map[int64]uint32(nil), (encFnInfo).fastpathEncMapInt64Uint32R, (decFnInfo).fastpathDecMapInt64Uint32R)
+	fn(map[int64]uint64(nil), (encFnInfo).fastpathEncMapInt64Uint64R, (decFnInfo).fastpathDecMapInt64Uint64R)
+	fn(map[int64]int(nil), (encFnInfo).fastpathEncMapInt64IntR, (decFnInfo).fastpathDecMapInt64IntR)
+	fn(map[int64]int8(nil), (encFnInfo).fastpathEncMapInt64Int8R, (decFnInfo).fastpathDecMapInt64Int8R)
+	fn(map[int64]int16(nil), (encFnInfo).fastpathEncMapInt64Int16R, (decFnInfo).fastpathDecMapInt64Int16R)
+	fn(map[int64]int32(nil), (encFnInfo).fastpathEncMapInt64Int32R, (decFnInfo).fastpathDecMapInt64Int32R)
+	fn(map[int64]int64(nil), (encFnInfo).fastpathEncMapInt64Int64R, (decFnInfo).fastpathDecMapInt64Int64R)
+	fn(map[int64]float32(nil), (encFnInfo).fastpathEncMapInt64Float32R, (decFnInfo).fastpathDecMapInt64Float32R)
+	fn(map[int64]float64(nil), (encFnInfo).fastpathEncMapInt64Float64R, (decFnInfo).fastpathDecMapInt64Float64R)
+	fn(map[int64]bool(nil), (encFnInfo).fastpathEncMapInt64BoolR, (decFnInfo).fastpathDecMapInt64BoolR)
+	fn(map[bool]interface{}(nil), (encFnInfo).fastpathEncMapBoolIntfR, (decFnInfo).fastpathDecMapBoolIntfR)
+	fn(map[bool]string(nil), (encFnInfo).fastpathEncMapBoolStringR, (decFnInfo).fastpathDecMapBoolStringR)
+	fn(map[bool]uint(nil), (encFnInfo).fastpathEncMapBoolUintR, (decFnInfo).fastpathDecMapBoolUintR)
+	fn(map[bool]uint8(nil), (encFnInfo).fastpathEncMapBoolUint8R, (decFnInfo).fastpathDecMapBoolUint8R)
+	fn(map[bool]uint16(nil), (encFnInfo).fastpathEncMapBoolUint16R, (decFnInfo).fastpathDecMapBoolUint16R)
+	fn(map[bool]uint32(nil), (encFnInfo).fastpathEncMapBoolUint32R, (decFnInfo).fastpathDecMapBoolUint32R)
+	fn(map[bool]uint64(nil), (encFnInfo).fastpathEncMapBoolUint64R, (decFnInfo).fastpathDecMapBoolUint64R)
+	fn(map[bool]int(nil), (encFnInfo).fastpathEncMapBoolIntR, (decFnInfo).fastpathDecMapBoolIntR)
+	fn(map[bool]int8(nil), (encFnInfo).fastpathEncMapBoolInt8R, (decFnInfo).fastpathDecMapBoolInt8R)
+	fn(map[bool]int16(nil), (encFnInfo).fastpathEncMapBoolInt16R, (decFnInfo).fastpathDecMapBoolInt16R)
+	fn(map[bool]int32(nil), (encFnInfo).fastpathEncMapBoolInt32R, (decFnInfo).fastpathDecMapBoolInt32R)
+	fn(map[bool]int64(nil), (encFnInfo).fastpathEncMapBoolInt64R, (decFnInfo).fastpathDecMapBoolInt64R)
+	fn(map[bool]float32(nil), (encFnInfo).fastpathEncMapBoolFloat32R, (decFnInfo).fastpathDecMapBoolFloat32R)
+	fn(map[bool]float64(nil), (encFnInfo).fastpathEncMapBoolFloat64R, (decFnInfo).fastpathDecMapBoolFloat64R)
+	fn(map[bool]bool(nil), (encFnInfo).fastpathEncMapBoolBoolR, (decFnInfo).fastpathDecMapBoolBoolR)
+
+	sort.Sort(fastpathAslice(fastpathAV[:]))
+}
+
+// -- encode
+
+// -- -- fast path type switch
+func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+
+	case []interface{}:
+		fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e)
+	case *[]interface{}:
+		fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]interface{}:
+		fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]interface{}:
+		fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]string:
+		fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]string:
+		fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint:
+		fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint:
+		fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint8:
+		fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint8:
+		fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint16:
+		fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint16:
+		fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint32:
+		fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint32:
+		fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint64:
+		fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint64:
+		fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int:
+		fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int:
+		fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int8:
+		fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int8:
+		fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int16:
+		fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int16:
+		fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int32:
+		fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int32:
+		fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int64:
+		fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int64:
+		fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]float32:
+		fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]float32:
+		fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]float64:
+		fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]float64:
+		fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]bool:
+		fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]bool:
+		fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e)
+
+	case []string:
+		fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e)
+	case *[]string:
+		fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]interface{}:
+		fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e)
+	case *map[string]interface{}:
+		fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]string:
+		fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e)
+	case *map[string]string:
+		fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint:
+		fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e)
+	case *map[string]uint:
+		fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint8:
+		fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint8:
+		fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint16:
+		fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint16:
+		fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint32:
+		fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint32:
+		fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint64:
+		fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint64:
+		fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int:
+		fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e)
+	case *map[string]int:
+		fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int8:
+		fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e)
+	case *map[string]int8:
+		fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int16:
+		fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e)
+	case *map[string]int16:
+		fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int32:
+		fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e)
+	case *map[string]int32:
+		fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int64:
+		fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e)
+	case *map[string]int64:
+		fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]float32:
+		fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[string]float32:
+		fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]float64:
+		fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[string]float64:
+		fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]bool:
+		fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e)
+	case *map[string]bool:
+		fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e)
+
+	case []float32:
+		fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e)
+	case *[]float32:
+		fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]interface{}:
+		fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[float32]interface{}:
+		fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]string:
+		fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e)
+	case *map[float32]string:
+		fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint:
+		fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint:
+		fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint8:
+		fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint8:
+		fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint16:
+		fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint16:
+		fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint32:
+		fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint32:
+		fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint64:
+		fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint64:
+		fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int:
+		fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e)
+	case *map[float32]int:
+		fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int8:
+		fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int8:
+		fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int16:
+		fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int16:
+		fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int32:
+		fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int32:
+		fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int64:
+		fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int64:
+		fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]float32:
+		fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]float32:
+		fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]float64:
+		fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]float64:
+		fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]bool:
+		fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[float32]bool:
+		fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []float64:
+		fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e)
+	case *[]float64:
+		fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]interface{}:
+		fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[float64]interface{}:
+		fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]string:
+		fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e)
+	case *map[float64]string:
+		fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint:
+		fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint:
+		fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint8:
+		fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint8:
+		fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint16:
+		fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint16:
+		fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint32:
+		fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint32:
+		fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint64:
+		fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint64:
+		fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int:
+		fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e)
+	case *map[float64]int:
+		fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int8:
+		fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int8:
+		fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int16:
+		fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int16:
+		fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int32:
+		fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int32:
+		fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int64:
+		fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int64:
+		fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]float32:
+		fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]float32:
+		fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]float64:
+		fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]float64:
+		fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]bool:
+		fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[float64]bool:
+		fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []uint:
+		fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e)
+	case *[]uint:
+		fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]interface{}:
+		fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint]interface{}:
+		fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]string:
+		fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e)
+	case *map[uint]string:
+		fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint:
+		fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint:
+		fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint8:
+		fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint8:
+		fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint16:
+		fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint16:
+		fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint32:
+		fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint32:
+		fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint64:
+		fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint64:
+		fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int:
+		fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e)
+	case *map[uint]int:
+		fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int8:
+		fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int8:
+		fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int16:
+		fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int16:
+		fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int32:
+		fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int32:
+		fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int64:
+		fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int64:
+		fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]float32:
+		fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]float32:
+		fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]float64:
+		fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]float64:
+		fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]bool:
+		fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint]bool:
+		fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]interface{}:
+		fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]interface{}:
+		fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]string:
+		fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]string:
+		fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint:
+		fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint:
+		fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint8:
+		fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint8:
+		fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint16:
+		fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint16:
+		fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint32:
+		fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint32:
+		fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint64:
+		fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint64:
+		fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int:
+		fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int:
+		fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int8:
+		fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int8:
+		fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int16:
+		fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int16:
+		fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int32:
+		fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int32:
+		fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int64:
+		fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int64:
+		fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]float32:
+		fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]float32:
+		fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]float64:
+		fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]float64:
+		fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]bool:
+		fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]bool:
+		fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []uint16:
+		fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e)
+	case *[]uint16:
+		fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]interface{}:
+		fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]interface{}:
+		fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]string:
+		fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]string:
+		fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint:
+		fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint:
+		fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint8:
+		fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint8:
+		fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint16:
+		fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint16:
+		fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint32:
+		fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint32:
+		fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint64:
+		fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint64:
+		fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int:
+		fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int:
+		fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int8:
+		fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int8:
+		fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int16:
+		fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int16:
+		fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int32:
+		fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int32:
+		fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int64:
+		fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int64:
+		fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]float32:
+		fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]float32:
+		fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]float64:
+		fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]float64:
+		fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]bool:
+		fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]bool:
+		fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []uint32:
+		fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e)
+	case *[]uint32:
+		fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]interface{}:
+		fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]interface{}:
+		fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]string:
+		fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]string:
+		fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint:
+		fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint:
+		fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint8:
+		fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint8:
+		fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint16:
+		fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint16:
+		fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint32:
+		fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint32:
+		fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint64:
+		fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint64:
+		fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int:
+		fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int:
+		fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int8:
+		fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int8:
+		fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int16:
+		fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int16:
+		fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int32:
+		fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int32:
+		fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int64:
+		fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int64:
+		fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]float32:
+		fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]float32:
+		fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]float64:
+		fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]float64:
+		fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]bool:
+		fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]bool:
+		fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []uint64:
+		fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e)
+	case *[]uint64:
+		fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]interface{}:
+		fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]interface{}:
+		fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]string:
+		fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]string:
+		fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint:
+		fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint:
+		fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint8:
+		fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint8:
+		fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint16:
+		fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint16:
+		fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint32:
+		fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint32:
+		fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint64:
+		fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint64:
+		fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int:
+		fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int:
+		fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int8:
+		fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int8:
+		fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int16:
+		fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int16:
+		fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int32:
+		fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int32:
+		fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int64:
+		fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int64:
+		fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]float32:
+		fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]float32:
+		fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]float64:
+		fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]float64:
+		fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]bool:
+		fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]bool:
+		fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []int:
+		fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e)
+	case *[]int:
+		fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]interface{}:
+		fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e)
+	case *map[int]interface{}:
+		fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]string:
+		fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e)
+	case *map[int]string:
+		fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint:
+		fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e)
+	case *map[int]uint:
+		fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint8:
+		fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint8:
+		fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint16:
+		fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint16:
+		fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint32:
+		fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint32:
+		fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint64:
+		fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint64:
+		fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int:
+		fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e)
+	case *map[int]int:
+		fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int8:
+		fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e)
+	case *map[int]int8:
+		fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int16:
+		fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e)
+	case *map[int]int16:
+		fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int32:
+		fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e)
+	case *map[int]int32:
+		fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int64:
+		fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e)
+	case *map[int]int64:
+		fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]float32:
+		fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[int]float32:
+		fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]float64:
+		fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[int]float64:
+		fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]bool:
+		fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e)
+	case *map[int]bool:
+		fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e)
+
+	case []int8:
+		fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e)
+	case *[]int8:
+		fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]interface{}:
+		fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int8]interface{}:
+		fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]string:
+		fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e)
+	case *map[int8]string:
+		fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint:
+		fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint:
+		fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint8:
+		fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint8:
+		fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint16:
+		fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint16:
+		fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint32:
+		fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint32:
+		fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint64:
+		fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint64:
+		fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int:
+		fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e)
+	case *map[int8]int:
+		fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int8:
+		fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int8:
+		fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int16:
+		fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int16:
+		fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int32:
+		fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int32:
+		fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int64:
+		fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int64:
+		fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]float32:
+		fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]float32:
+		fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]float64:
+		fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]float64:
+		fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]bool:
+		fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int8]bool:
+		fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []int16:
+		fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e)
+	case *[]int16:
+		fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]interface{}:
+		fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int16]interface{}:
+		fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]string:
+		fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e)
+	case *map[int16]string:
+		fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint:
+		fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint:
+		fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint8:
+		fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint8:
+		fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint16:
+		fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint16:
+		fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint32:
+		fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint32:
+		fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint64:
+		fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint64:
+		fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int:
+		fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e)
+	case *map[int16]int:
+		fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int8:
+		fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int8:
+		fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int16:
+		fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int16:
+		fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int32:
+		fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int32:
+		fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int64:
+		fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int64:
+		fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]float32:
+		fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]float32:
+		fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]float64:
+		fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]float64:
+		fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]bool:
+		fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int16]bool:
+		fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []int32:
+		fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e)
+	case *[]int32:
+		fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]interface{}:
+		fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int32]interface{}:
+		fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]string:
+		fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e)
+	case *map[int32]string:
+		fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint:
+		fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint:
+		fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint8:
+		fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint8:
+		fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint16:
+		fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint16:
+		fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint32:
+		fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint32:
+		fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint64:
+		fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint64:
+		fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int:
+		fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e)
+	case *map[int32]int:
+		fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int8:
+		fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int8:
+		fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int16:
+		fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int16:
+		fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int32:
+		fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int32:
+		fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int64:
+		fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int64:
+		fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]float32:
+		fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]float32:
+		fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]float64:
+		fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]float64:
+		fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]bool:
+		fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int32]bool:
+		fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []int64:
+		fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e)
+	case *[]int64:
+		fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]interface{}:
+		fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int64]interface{}:
+		fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]string:
+		fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e)
+	case *map[int64]string:
+		fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint:
+		fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint:
+		fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint8:
+		fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint8:
+		fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint16:
+		fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint16:
+		fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint32:
+		fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint32:
+		fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint64:
+		fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint64:
+		fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int:
+		fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e)
+	case *map[int64]int:
+		fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int8:
+		fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int8:
+		fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int16:
+		fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int16:
+		fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int32:
+		fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int32:
+		fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int64:
+		fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int64:
+		fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]float32:
+		fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]float32:
+		fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]float64:
+		fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]float64:
+		fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]bool:
+		fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int64]bool:
+		fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case []bool:
+		fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e)
+	case *[]bool:
+		fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]interface{}:
+		fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e)
+	case *map[bool]interface{}:
+		fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]string:
+		fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e)
+	case *map[bool]string:
+		fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint:
+		fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint:
+		fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint8:
+		fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint8:
+		fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint16:
+		fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint16:
+		fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint32:
+		fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint32:
+		fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint64:
+		fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint64:
+		fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int:
+		fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e)
+	case *map[bool]int:
+		fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int8:
+		fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int8:
+		fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int16:
+		fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int16:
+		fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int32:
+		fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int32:
+		fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int64:
+		fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int64:
+		fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]float32:
+		fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]float32:
+		fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]float64:
+		fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]float64:
+		fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]bool:
+		fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e)
+	case *map[bool]bool:
+		fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e)
+
+	default:
+		return false
+	}
+	return true
+}
+
+func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+
+	case []interface{}:
+		fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e)
+	case *[]interface{}:
+		fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e)
+
+	case []string:
+		fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e)
+	case *[]string:
+		fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e)
+
+	case []float32:
+		fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e)
+	case *[]float32:
+		fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case []float64:
+		fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e)
+	case *[]float64:
+		fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case []uint:
+		fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e)
+	case *[]uint:
+		fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e)
+
+	case []uint16:
+		fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e)
+	case *[]uint16:
+		fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e)
+
+	case []uint32:
+		fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e)
+	case *[]uint32:
+		fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e)
+
+	case []uint64:
+		fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e)
+	case *[]uint64:
+		fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e)
+
+	case []int:
+		fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e)
+	case *[]int:
+		fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e)
+
+	case []int8:
+		fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e)
+	case *[]int8:
+		fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e)
+
+	case []int16:
+		fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e)
+	case *[]int16:
+		fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e)
+
+	case []int32:
+		fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e)
+	case *[]int32:
+		fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e)
+
+	case []int64:
+		fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e)
+	case *[]int64:
+		fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e)
+
+	case []bool:
+		fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e)
+	case *[]bool:
+		fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e)
+
+	default:
+		return false
+	}
+	return true
+}
+
+func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+
+	case map[interface{}]interface{}:
+		fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]interface{}:
+		fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]string:
+		fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]string:
+		fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint:
+		fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint:
+		fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint8:
+		fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint8:
+		fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint16:
+		fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint16:
+		fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint32:
+		fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint32:
+		fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]uint64:
+		fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]uint64:
+		fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int:
+		fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int:
+		fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int8:
+		fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int8:
+		fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int16:
+		fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int16:
+		fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int32:
+		fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int32:
+		fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]int64:
+		fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]int64:
+		fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]float32:
+		fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]float32:
+		fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]float64:
+		fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]float64:
+		fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[interface{}]bool:
+		fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e)
+	case *map[interface{}]bool:
+		fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]interface{}:
+		fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e)
+	case *map[string]interface{}:
+		fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]string:
+		fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e)
+	case *map[string]string:
+		fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint:
+		fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e)
+	case *map[string]uint:
+		fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint8:
+		fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint8:
+		fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint16:
+		fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint16:
+		fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint32:
+		fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint32:
+		fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]uint64:
+		fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e)
+	case *map[string]uint64:
+		fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int:
+		fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e)
+	case *map[string]int:
+		fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int8:
+		fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e)
+	case *map[string]int8:
+		fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int16:
+		fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e)
+	case *map[string]int16:
+		fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int32:
+		fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e)
+	case *map[string]int32:
+		fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]int64:
+		fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e)
+	case *map[string]int64:
+		fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]float32:
+		fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[string]float32:
+		fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]float64:
+		fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[string]float64:
+		fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[string]bool:
+		fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e)
+	case *map[string]bool:
+		fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]interface{}:
+		fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[float32]interface{}:
+		fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]string:
+		fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e)
+	case *map[float32]string:
+		fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint:
+		fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint:
+		fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint8:
+		fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint8:
+		fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint16:
+		fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint16:
+		fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint32:
+		fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint32:
+		fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]uint64:
+		fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]uint64:
+		fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int:
+		fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e)
+	case *map[float32]int:
+		fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int8:
+		fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int8:
+		fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int16:
+		fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int16:
+		fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int32:
+		fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int32:
+		fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]int64:
+		fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]int64:
+		fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]float32:
+		fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[float32]float32:
+		fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]float64:
+		fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[float32]float64:
+		fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float32]bool:
+		fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[float32]bool:
+		fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]interface{}:
+		fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[float64]interface{}:
+		fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]string:
+		fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e)
+	case *map[float64]string:
+		fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint:
+		fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint:
+		fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint8:
+		fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint8:
+		fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint16:
+		fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint16:
+		fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint32:
+		fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint32:
+		fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]uint64:
+		fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]uint64:
+		fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int:
+		fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e)
+	case *map[float64]int:
+		fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int8:
+		fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int8:
+		fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int16:
+		fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int16:
+		fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int32:
+		fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int32:
+		fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]int64:
+		fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]int64:
+		fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]float32:
+		fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[float64]float32:
+		fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]float64:
+		fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[float64]float64:
+		fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[float64]bool:
+		fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[float64]bool:
+		fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]interface{}:
+		fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint]interface{}:
+		fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]string:
+		fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e)
+	case *map[uint]string:
+		fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint:
+		fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint:
+		fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint8:
+		fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint8:
+		fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint16:
+		fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint16:
+		fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint32:
+		fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint32:
+		fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]uint64:
+		fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]uint64:
+		fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int:
+		fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e)
+	case *map[uint]int:
+		fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int8:
+		fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int8:
+		fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int16:
+		fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int16:
+		fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int32:
+		fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int32:
+		fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]int64:
+		fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]int64:
+		fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]float32:
+		fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[uint]float32:
+		fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]float64:
+		fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[uint]float64:
+		fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint]bool:
+		fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint]bool:
+		fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]interface{}:
+		fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]interface{}:
+		fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]string:
+		fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]string:
+		fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint:
+		fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint:
+		fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint8:
+		fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint8:
+		fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint16:
+		fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint16:
+		fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint32:
+		fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint32:
+		fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]uint64:
+		fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]uint64:
+		fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int:
+		fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int:
+		fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int8:
+		fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int8:
+		fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int16:
+		fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int16:
+		fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int32:
+		fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int32:
+		fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]int64:
+		fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]int64:
+		fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]float32:
+		fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]float32:
+		fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]float64:
+		fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint8]float64:
+		fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint8]bool:
+		fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint8]bool:
+		fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]interface{}:
+		fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]interface{}:
+		fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]string:
+		fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]string:
+		fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint:
+		fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint:
+		fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint8:
+		fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint8:
+		fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint16:
+		fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint16:
+		fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint32:
+		fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint32:
+		fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]uint64:
+		fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]uint64:
+		fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int:
+		fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int:
+		fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int8:
+		fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int8:
+		fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int16:
+		fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int16:
+		fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int32:
+		fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int32:
+		fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]int64:
+		fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]int64:
+		fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]float32:
+		fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]float32:
+		fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]float64:
+		fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint16]float64:
+		fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint16]bool:
+		fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint16]bool:
+		fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]interface{}:
+		fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]interface{}:
+		fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]string:
+		fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]string:
+		fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint:
+		fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint:
+		fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint8:
+		fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint8:
+		fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint16:
+		fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint16:
+		fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint32:
+		fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint32:
+		fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]uint64:
+		fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]uint64:
+		fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int:
+		fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int:
+		fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int8:
+		fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int8:
+		fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int16:
+		fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int16:
+		fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int32:
+		fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int32:
+		fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]int64:
+		fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]int64:
+		fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]float32:
+		fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]float32:
+		fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]float64:
+		fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint32]float64:
+		fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint32]bool:
+		fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint32]bool:
+		fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]interface{}:
+		fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]interface{}:
+		fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]string:
+		fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]string:
+		fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint:
+		fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint:
+		fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint8:
+		fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint8:
+		fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint16:
+		fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint16:
+		fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint32:
+		fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint32:
+		fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]uint64:
+		fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]uint64:
+		fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int:
+		fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int:
+		fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int8:
+		fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int8:
+		fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int16:
+		fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int16:
+		fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int32:
+		fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int32:
+		fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]int64:
+		fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]int64:
+		fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]float32:
+		fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]float32:
+		fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]float64:
+		fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[uint64]float64:
+		fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[uint64]bool:
+		fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[uint64]bool:
+		fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]interface{}:
+		fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e)
+	case *map[int]interface{}:
+		fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]string:
+		fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e)
+	case *map[int]string:
+		fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint:
+		fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e)
+	case *map[int]uint:
+		fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint8:
+		fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint8:
+		fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint16:
+		fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint16:
+		fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint32:
+		fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint32:
+		fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]uint64:
+		fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e)
+	case *map[int]uint64:
+		fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int:
+		fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e)
+	case *map[int]int:
+		fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int8:
+		fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e)
+	case *map[int]int8:
+		fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int16:
+		fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e)
+	case *map[int]int16:
+		fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int32:
+		fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e)
+	case *map[int]int32:
+		fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]int64:
+		fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e)
+	case *map[int]int64:
+		fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]float32:
+		fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[int]float32:
+		fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]float64:
+		fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[int]float64:
+		fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int]bool:
+		fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e)
+	case *map[int]bool:
+		fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]interface{}:
+		fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int8]interface{}:
+		fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]string:
+		fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e)
+	case *map[int8]string:
+		fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint:
+		fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint:
+		fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint8:
+		fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint8:
+		fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint16:
+		fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint16:
+		fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint32:
+		fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint32:
+		fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]uint64:
+		fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]uint64:
+		fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int:
+		fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e)
+	case *map[int8]int:
+		fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int8:
+		fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int8:
+		fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int16:
+		fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int16:
+		fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int32:
+		fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int32:
+		fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]int64:
+		fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]int64:
+		fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]float32:
+		fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int8]float32:
+		fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]float64:
+		fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int8]float64:
+		fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int8]bool:
+		fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int8]bool:
+		fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]interface{}:
+		fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int16]interface{}:
+		fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]string:
+		fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e)
+	case *map[int16]string:
+		fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint:
+		fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint:
+		fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint8:
+		fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint8:
+		fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint16:
+		fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint16:
+		fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint32:
+		fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint32:
+		fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]uint64:
+		fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]uint64:
+		fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int:
+		fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e)
+	case *map[int16]int:
+		fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int8:
+		fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int8:
+		fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int16:
+		fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int16:
+		fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int32:
+		fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int32:
+		fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]int64:
+		fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]int64:
+		fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]float32:
+		fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int16]float32:
+		fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]float64:
+		fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int16]float64:
+		fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int16]bool:
+		fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int16]bool:
+		fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]interface{}:
+		fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int32]interface{}:
+		fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]string:
+		fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e)
+	case *map[int32]string:
+		fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint:
+		fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint:
+		fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint8:
+		fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint8:
+		fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint16:
+		fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint16:
+		fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint32:
+		fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint32:
+		fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]uint64:
+		fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]uint64:
+		fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int:
+		fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e)
+	case *map[int32]int:
+		fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int8:
+		fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int8:
+		fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int16:
+		fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int16:
+		fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int32:
+		fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int32:
+		fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]int64:
+		fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]int64:
+		fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]float32:
+		fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int32]float32:
+		fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]float64:
+		fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int32]float64:
+		fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int32]bool:
+		fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int32]bool:
+		fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]interface{}:
+		fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e)
+	case *map[int64]interface{}:
+		fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]string:
+		fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e)
+	case *map[int64]string:
+		fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint:
+		fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint:
+		fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint8:
+		fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint8:
+		fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint16:
+		fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint16:
+		fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint32:
+		fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint32:
+		fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]uint64:
+		fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]uint64:
+		fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int:
+		fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e)
+	case *map[int64]int:
+		fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int8:
+		fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int8:
+		fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int16:
+		fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int16:
+		fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int32:
+		fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int32:
+		fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]int64:
+		fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]int64:
+		fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]float32:
+		fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e)
+	case *map[int64]float32:
+		fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]float64:
+		fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e)
+	case *map[int64]float64:
+		fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e)
+
+	case map[int64]bool:
+		fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e)
+	case *map[int64]bool:
+		fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]interface{}:
+		fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e)
+	case *map[bool]interface{}:
+		fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]string:
+		fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e)
+	case *map[bool]string:
+		fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint:
+		fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint:
+		fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint8:
+		fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint8:
+		fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint16:
+		fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint16:
+		fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint32:
+		fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint32:
+		fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]uint64:
+		fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]uint64:
+		fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int:
+		fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e)
+	case *map[bool]int:
+		fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int8:
+		fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int8:
+		fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int16:
+		fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int16:
+		fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int32:
+		fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int32:
+		fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]int64:
+		fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]int64:
+		fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]float32:
+		fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e)
+	case *map[bool]float32:
+		fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]float64:
+		fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e)
+	case *map[bool]float64:
+		fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e)
+
+	case map[bool]bool:
+		fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e)
+	case *map[bool]bool:
+		fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e)
+
+	default:
+		return false
+	}
+	return true
+}
+
+// -- -- fast path functions
+
+func (f encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) {
+	fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			e.encode(v2)
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			e.encode(v2)
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceStringR(rv reflect.Value) {
+	fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeString(c_UTF8, v2)
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) {
+	fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeFloat32(v2)
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) {
+	fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeFloat64(v2)
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceUintR(rv reflect.Value) {
+	fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) {
+	fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) {
+	fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) {
+	fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceIntR(rv reflect.Value) {
+	fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeInt(int64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) {
+	fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeInt(int64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) {
+	fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeInt(int64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) {
+	fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeInt(int64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) {
+	fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeInt(int64(v2))
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) {
+	fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			ee.EncodeBool(v2)
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			ee.EncodeBool(v2)
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) {
+	fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) {
+	fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) {
+	fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) {
+	fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) {
+	fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) {
+	fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) {
+	fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) {
+	fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) {
+	fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) {
+	fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) {
+	fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) {
+	fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) {
+	fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) {
+	fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) {
+	fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			e.encode(k2)
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			e.encode(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) {
+	fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) {
+	fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) {
+	fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) {
+	fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) {
+	fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) {
+	fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) {
+	fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) {
+	fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) {
+	fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) {
+	fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) {
+	fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) {
+	fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) {
+	fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) {
+	fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) {
+	fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0
+	if e.be {
+		for k2, v2 := range v {
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) {
+	fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) {
+	fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) {
+	fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) {
+	fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) {
+	fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat32(k2)
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat32(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) {
+	fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) {
+	fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) {
+	fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) {
+	fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) {
+	fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) {
+	fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeFloat64(k2)
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeFloat64(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) {
+	fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) {
+	fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) {
+	fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) {
+	fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) {
+	fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) {
+	fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) {
+	fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) {
+	fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) {
+	fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) {
+	fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) {
+	fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) {
+	fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) {
+	fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) {
+	fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) {
+	fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) {
+	fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) {
+	fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) {
+	fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) {
+	fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) {
+	fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) {
+	fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) {
+	fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) {
+	fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) {
+	fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) {
+	fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) {
+	fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) {
+	fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) {
+	fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) {
+	fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) {
+	fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) {
+	fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) {
+	fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) {
+	fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) {
+	fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) {
+	fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) {
+	fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) {
+	fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) {
+	fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) {
+	fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeUint(uint64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) {
+	fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) {
+	fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) {
+	fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) {
+	fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) {
+	fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) {
+	fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) {
+	fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) {
+	fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) {
+	fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) {
+	fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) {
+	fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) {
+	fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) {
+	fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) {
+	fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) {
+	fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) {
+	fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) {
+	fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) {
+	fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) {
+	fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) {
+	fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) {
+	fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) {
+	fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) {
+	fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) {
+	fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) {
+	fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) {
+	fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) {
+	fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) {
+	fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) {
+	fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) {
+	fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) {
+	fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) {
+	fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) {
+	fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) {
+	fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) {
+	fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) {
+	fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) {
+	fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) {
+	fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) {
+	fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeInt(int64(k2))
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeInt(int64(k2))
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) {
+	fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			e.encode(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			e.encode(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) {
+	fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeString(c_UTF8, v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeString(c_UTF8, v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) {
+	fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) {
+	fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) {
+	fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) {
+	fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) {
+	fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeUint(uint64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeUint(uint64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) {
+	fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) {
+	fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) {
+	fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) {
+	fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) {
+	fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeInt(int64(v2))
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeInt(int64(v2))
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) {
+	fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeFloat32(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat32(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) {
+	fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeFloat64(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeFloat64(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+func (f encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) {
+	fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+
+	if e.be {
+		for k2, v2 := range v {
+			ee.EncodeBool(k2)
+			ee.EncodeBool(v2)
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			ee.EncodeBool(k2)
+			ee.EncodeMapKVSeparator()
+			ee.EncodeBool(v2)
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+// -- decode
+
+// -- -- fast path type switch
+func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool {
+	switch v := iv.(type) {
+
+	case []interface{}:
+		fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d)
+	case *[]interface{}:
+		v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]interface{}:
+		fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]interface{}:
+		v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]string:
+		fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]string:
+		v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]uint:
+		fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]uint:
+		v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]uint8:
+		fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]uint8:
+		v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]uint16:
+		fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]uint16:
+		v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]uint32:
+		fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]uint32:
+		v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]uint64:
+		fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]uint64:
+		v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]int:
+		fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]int:
+		v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]int8:
+		fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]int8:
+		v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]int16:
+		fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]int16:
+		v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]int32:
+		fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]int32:
+		v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]int64:
+		fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]int64:
+		v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]float32:
+		fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]float32:
+		v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]float64:
+		fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]float64:
+		v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[interface{}]bool:
+		fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[interface{}]bool:
+		v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []string:
+		fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d)
+	case *[]string:
+		v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]interface{}:
+		fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[string]interface{}:
+		v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]string:
+		fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d)
+	case *map[string]string:
+		v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]uint:
+		fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d)
+	case *map[string]uint:
+		v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]uint8:
+		fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]uint8:
+		v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]uint16:
+		fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]uint16:
+		v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]uint32:
+		fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]uint32:
+		v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]uint64:
+		fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]uint64:
+		v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]int:
+		fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d)
+	case *map[string]int:
+		v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]int8:
+		fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]int8:
+		v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]int16:
+		fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]int16:
+		v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]int32:
+		fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]int32:
+		v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]int64:
+		fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]int64:
+		v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]float32:
+		fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]float32:
+		v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]float64:
+		fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *map[string]float64:
+		v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[string]bool:
+		fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[string]bool:
+		v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []float32:
+		fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *[]float32:
+		v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]interface{}:
+		fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]interface{}:
+		v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]string:
+		fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]string:
+		v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]uint:
+		fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]uint:
+		v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]uint8:
+		fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]uint8:
+		v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]uint16:
+		fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]uint16:
+		v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]uint32:
+		fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]uint32:
+		v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]uint64:
+		fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]uint64:
+		v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]int:
+		fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]int:
+		v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]int8:
+		fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]int8:
+		v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]int16:
+		fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]int16:
+		v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]int32:
+		fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]int32:
+		v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]int64:
+		fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]int64:
+		v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]float32:
+		fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]float32:
+		v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]float64:
+		fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]float64:
+		v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float32]bool:
+		fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[float32]bool:
+		v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []float64:
+		fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *[]float64:
+		v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]interface{}:
+		fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]interface{}:
+		v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]string:
+		fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]string:
+		v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]uint:
+		fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]uint:
+		v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]uint8:
+		fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]uint8:
+		v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]uint16:
+		fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]uint16:
+		v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]uint32:
+		fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]uint32:
+		v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]uint64:
+		fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]uint64:
+		v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]int:
+		fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]int:
+		v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]int8:
+		fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]int8:
+		v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]int16:
+		fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]int16:
+		v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]int32:
+		fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]int32:
+		v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]int64:
+		fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]int64:
+		v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]float32:
+		fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]float32:
+		v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]float64:
+		fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]float64:
+		v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[float64]bool:
+		fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[float64]bool:
+		v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []uint:
+		fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d)
+	case *[]uint:
+		v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]interface{}:
+		fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]interface{}:
+		v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]string:
+		fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]string:
+		v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]uint:
+		fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]uint:
+		v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]uint8:
+		fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]uint8:
+		v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]uint16:
+		fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]uint16:
+		v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]uint32:
+		fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]uint32:
+		v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]uint64:
+		fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]uint64:
+		v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]int:
+		fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]int:
+		v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]int8:
+		fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]int8:
+		v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]int16:
+		fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]int16:
+		v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]int32:
+		fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]int32:
+		v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]int64:
+		fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]int64:
+		v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]float32:
+		fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]float32:
+		v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]float64:
+		fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]float64:
+		v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint]bool:
+		fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint]bool:
+		v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]interface{}:
+		fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]interface{}:
+		v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]string:
+		fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]string:
+		v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]uint:
+		fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]uint:
+		v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]uint8:
+		fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]uint8:
+		v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]uint16:
+		fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]uint16:
+		v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]uint32:
+		fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]uint32:
+		v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]uint64:
+		fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]uint64:
+		v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]int:
+		fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]int:
+		v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]int8:
+		fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]int8:
+		v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]int16:
+		fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]int16:
+		v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]int32:
+		fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]int32:
+		v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]int64:
+		fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]int64:
+		v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]float32:
+		fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]float32:
+		v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]float64:
+		fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]float64:
+		v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint8]bool:
+		fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint8]bool:
+		v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []uint16:
+		fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d)
+	case *[]uint16:
+		v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]interface{}:
+		fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]interface{}:
+		v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]string:
+		fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]string:
+		v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]uint:
+		fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]uint:
+		v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]uint8:
+		fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]uint8:
+		v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]uint16:
+		fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]uint16:
+		v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]uint32:
+		fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]uint32:
+		v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]uint64:
+		fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]uint64:
+		v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]int:
+		fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]int:
+		v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]int8:
+		fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]int8:
+		v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]int16:
+		fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]int16:
+		v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]int32:
+		fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]int32:
+		v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]int64:
+		fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]int64:
+		v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]float32:
+		fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]float32:
+		v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]float64:
+		fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]float64:
+		v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint16]bool:
+		fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint16]bool:
+		v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []uint32:
+		fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d)
+	case *[]uint32:
+		v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]interface{}:
+		fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]interface{}:
+		v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]string:
+		fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]string:
+		v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]uint:
+		fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]uint:
+		v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]uint8:
+		fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]uint8:
+		v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]uint16:
+		fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]uint16:
+		v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]uint32:
+		fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]uint32:
+		v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]uint64:
+		fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]uint64:
+		v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]int:
+		fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]int:
+		v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]int8:
+		fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]int8:
+		v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]int16:
+		fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]int16:
+		v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]int32:
+		fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]int32:
+		v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]int64:
+		fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]int64:
+		v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]float32:
+		fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]float32:
+		v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]float64:
+		fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]float64:
+		v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint32]bool:
+		fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint32]bool:
+		v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []uint64:
+		fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d)
+	case *[]uint64:
+		v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]interface{}:
+		fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]interface{}:
+		v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]string:
+		fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]string:
+		v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]uint:
+		fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]uint:
+		v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]uint8:
+		fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]uint8:
+		v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]uint16:
+		fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]uint16:
+		v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]uint32:
+		fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]uint32:
+		v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]uint64:
+		fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]uint64:
+		v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]int:
+		fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]int:
+		v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]int8:
+		fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]int8:
+		v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]int16:
+		fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]int16:
+		v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]int32:
+		fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]int32:
+		v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]int64:
+		fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]int64:
+		v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]float32:
+		fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]float32:
+		v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]float64:
+		fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]float64:
+		v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[uint64]bool:
+		fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[uint64]bool:
+		v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []int:
+		fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d)
+	case *[]int:
+		v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]interface{}:
+		fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[int]interface{}:
+		v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]string:
+		fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d)
+	case *map[int]string:
+		v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]uint:
+		fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d)
+	case *map[int]uint:
+		v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]uint8:
+		fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]uint8:
+		v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]uint16:
+		fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]uint16:
+		v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]uint32:
+		fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]uint32:
+		v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]uint64:
+		fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]uint64:
+		v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]int:
+		fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d)
+	case *map[int]int:
+		v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]int8:
+		fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]int8:
+		v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]int16:
+		fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]int16:
+		v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]int32:
+		fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]int32:
+		v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]int64:
+		fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]int64:
+		v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]float32:
+		fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]float32:
+		v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]float64:
+		fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int]float64:
+		v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int]bool:
+		fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[int]bool:
+		v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []int8:
+		fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d)
+	case *[]int8:
+		v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]interface{}:
+		fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]interface{}:
+		v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]string:
+		fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]string:
+		v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]uint:
+		fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]uint:
+		v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]uint8:
+		fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]uint8:
+		v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]uint16:
+		fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]uint16:
+		v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]uint32:
+		fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]uint32:
+		v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]uint64:
+		fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]uint64:
+		v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]int:
+		fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]int:
+		v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]int8:
+		fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]int8:
+		v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]int16:
+		fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]int16:
+		v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]int32:
+		fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]int32:
+		v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]int64:
+		fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]int64:
+		v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]float32:
+		fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]float32:
+		v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]float64:
+		fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]float64:
+		v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int8]bool:
+		fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[int8]bool:
+		v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []int16:
+		fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d)
+	case *[]int16:
+		v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]interface{}:
+		fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]interface{}:
+		v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]string:
+		fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]string:
+		v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]uint:
+		fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]uint:
+		v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]uint8:
+		fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]uint8:
+		v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]uint16:
+		fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]uint16:
+		v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]uint32:
+		fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]uint32:
+		v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]uint64:
+		fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]uint64:
+		v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]int:
+		fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]int:
+		v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]int8:
+		fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]int8:
+		v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]int16:
+		fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]int16:
+		v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]int32:
+		fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]int32:
+		v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]int64:
+		fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]int64:
+		v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]float32:
+		fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]float32:
+		v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]float64:
+		fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]float64:
+		v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int16]bool:
+		fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[int16]bool:
+		v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []int32:
+		fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d)
+	case *[]int32:
+		v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]interface{}:
+		fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]interface{}:
+		v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]string:
+		fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]string:
+		v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]uint:
+		fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]uint:
+		v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]uint8:
+		fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]uint8:
+		v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]uint16:
+		fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]uint16:
+		v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]uint32:
+		fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]uint32:
+		v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]uint64:
+		fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]uint64:
+		v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]int:
+		fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]int:
+		v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]int8:
+		fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]int8:
+		v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]int16:
+		fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]int16:
+		v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]int32:
+		fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]int32:
+		v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]int64:
+		fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]int64:
+		v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]float32:
+		fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]float32:
+		v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]float64:
+		fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]float64:
+		v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int32]bool:
+		fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[int32]bool:
+		v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []int64:
+		fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d)
+	case *[]int64:
+		v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]interface{}:
+		fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]interface{}:
+		v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]string:
+		fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]string:
+		v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]uint:
+		fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]uint:
+		v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]uint8:
+		fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]uint8:
+		v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]uint16:
+		fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]uint16:
+		v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]uint32:
+		fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]uint32:
+		v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]uint64:
+		fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]uint64:
+		v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]int:
+		fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]int:
+		v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]int8:
+		fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]int8:
+		v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]int16:
+		fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]int16:
+		v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]int32:
+		fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]int32:
+		v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]int64:
+		fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]int64:
+		v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]float32:
+		fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]float32:
+		v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]float64:
+		fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]float64:
+		v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[int64]bool:
+		fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[int64]bool:
+		v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case []bool:
+		fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d)
+	case *[]bool:
+		v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]interface{}:
+		fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]interface{}:
+		v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]string:
+		fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]string:
+		v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]uint:
+		fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]uint:
+		v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]uint8:
+		fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]uint8:
+		v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]uint16:
+		fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]uint16:
+		v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]uint32:
+		fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]uint32:
+		v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]uint64:
+		fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]uint64:
+		v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]int:
+		fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]int:
+		v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]int8:
+		fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]int8:
+		v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]int16:
+		fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]int16:
+		v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]int32:
+		fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]int32:
+		v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]int64:
+		fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]int64:
+		v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]float32:
+		fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]float32:
+		v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]float64:
+		fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]float64:
+		v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	case map[bool]bool:
+		fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d)
+	case *map[bool]bool:
+		v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2
+		}
+
+	default:
+		return false
+	}
+	return true
+}
+
+// -- -- fast path functions
+
+func (f decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]interface{})
+		v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]interface{})
+		fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ []interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []interface{}{}
+		} else {
+			v = make([]interface{}, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]interface{}, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			d.decode(&v[j])
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, nil)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				d.decode(&v[j])
+
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceStringR(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]string)
+		v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]string)
+		fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool,
+	d *Decoder) (_ []string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []string{}
+		} else {
+			v = make([]string, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]string, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = dd.DecodeString()
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, "")
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = dd.DecodeString()
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]float32)
+		v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]float32)
+		fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool,
+	d *Decoder) (_ []float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []float32{}
+		} else {
+			v = make([]float32, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]float32, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = float32(dd.DecodeFloat(true))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = float32(dd.DecodeFloat(true))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]float64)
+		v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]float64)
+		fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool,
+	d *Decoder) (_ []float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []float64{}
+		} else {
+			v = make([]float64, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]float64, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = dd.DecodeFloat(false)
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = dd.DecodeFloat(false)
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceUintR(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]uint)
+		v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]uint)
+		fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool,
+	d *Decoder) (_ []uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []uint{}
+		} else {
+			v = make([]uint, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]uint, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = uint(dd.DecodeUint(uintBitsize))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = uint(dd.DecodeUint(uintBitsize))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]uint16)
+		v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]uint16)
+		fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ []uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []uint16{}
+		} else {
+			v = make([]uint16, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]uint16, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = uint16(dd.DecodeUint(16))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = uint16(dd.DecodeUint(16))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]uint32)
+		v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]uint32)
+		fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ []uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []uint32{}
+		} else {
+			v = make([]uint32, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]uint32, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = uint32(dd.DecodeUint(32))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = uint32(dd.DecodeUint(32))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]uint64)
+		v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]uint64)
+		fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ []uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []uint64{}
+		} else {
+			v = make([]uint64, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]uint64, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = dd.DecodeUint(64)
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = dd.DecodeUint(64)
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceIntR(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]int)
+		v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]int)
+		fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool,
+	d *Decoder) (_ []int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []int{}
+		} else {
+			v = make([]int, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]int, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = int(dd.DecodeInt(intBitsize))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = int(dd.DecodeInt(intBitsize))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]int8)
+		v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]int8)
+		fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool,
+	d *Decoder) (_ []int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []int8{}
+		} else {
+			v = make([]int8, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]int8, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = int8(dd.DecodeInt(8))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = int8(dd.DecodeInt(8))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]int16)
+		v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]int16)
+		fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool,
+	d *Decoder) (_ []int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []int16{}
+		} else {
+			v = make([]int16, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]int16, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = int16(dd.DecodeInt(16))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = int16(dd.DecodeInt(16))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]int32)
+		v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]int32)
+		fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool,
+	d *Decoder) (_ []int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []int32{}
+		} else {
+			v = make([]int32, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]int32, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = int32(dd.DecodeInt(32))
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = int32(dd.DecodeInt(32))
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]int64)
+		v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]int64)
+		fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool,
+	d *Decoder) (_ []int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []int64{}
+		} else {
+			v = make([]int64, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]int64, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = dd.DecodeInt(64)
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, 0)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = dd.DecodeInt(64)
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) {
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported
+		vp := rv.Addr().Interface().(*[]bool)
+		v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]bool)
+		fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecSliceBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool,
+	d *Decoder) (_ []bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []bool{}
+		} else {
+			v = make([]bool, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true
+		}
+		return v, changed
+	}
+
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]bool, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ {
+			v[j] = dd.DecodeBool()
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ {
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) {
+				if canChange {
+					v = append(v, false)
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			}
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				v[j] = dd.DecodeBool()
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]interface{})
+		v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]interface{})
+		fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]interface{}, containerLen)
+		} else {
+			v = make(map[interface{}]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]string)
+		v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]string)
+		fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]string, containerLen)
+		} else {
+			v = make(map[interface{}]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]uint)
+		v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]uint)
+		fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]uint, containerLen)
+		} else {
+			v = make(map[interface{}]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]uint8)
+		v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]uint8)
+		fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]uint8, containerLen)
+		} else {
+			v = make(map[interface{}]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]uint16)
+		v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]uint16)
+		fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]uint16, containerLen)
+		} else {
+			v = make(map[interface{}]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]uint32)
+		v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]uint32)
+		fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]uint32, containerLen)
+		} else {
+			v = make(map[interface{}]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]uint64)
+		v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]uint64)
+		fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]uint64, containerLen)
+		} else {
+			v = make(map[interface{}]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]int)
+		v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]int)
+		fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]int, containerLen)
+		} else {
+			v = make(map[interface{}]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]int8)
+		v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]int8)
+		fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]int8, containerLen)
+		} else {
+			v = make(map[interface{}]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]int16)
+		v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]int16)
+		fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]int16, containerLen)
+		} else {
+			v = make(map[interface{}]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]int32)
+		v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]int32)
+		fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]int32, containerLen)
+		} else {
+			v = make(map[interface{}]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]int64)
+		v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]int64)
+		fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]int64, containerLen)
+		} else {
+			v = make(map[interface{}]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]float32)
+		v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]float32)
+		fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]float32, containerLen)
+		} else {
+			v = make(map[interface{}]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]float64)
+		v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]float64)
+		fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]float64, containerLen)
+		} else {
+			v = make(map[interface{}]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[interface{}]bool)
+		v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[interface{}]bool)
+		fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[interface{}]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[interface{}]bool, containerLen)
+		} else {
+			v = make(map[interface{}]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]interface{})
+		v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]interface{})
+		fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]interface{}, containerLen)
+		} else {
+			v = make(map[string]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]string)
+		v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]string)
+		fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]string, containerLen)
+		} else {
+			v = make(map[string]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]uint)
+		v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]uint)
+		fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]uint, containerLen)
+		} else {
+			v = make(map[string]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]uint8)
+		v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]uint8)
+		fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]uint8, containerLen)
+		} else {
+			v = make(map[string]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]uint16)
+		v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]uint16)
+		fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]uint16, containerLen)
+		} else {
+			v = make(map[string]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]uint32)
+		v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]uint32)
+		fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]uint32, containerLen)
+		} else {
+			v = make(map[string]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]uint64)
+		v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]uint64)
+		fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]uint64, containerLen)
+		} else {
+			v = make(map[string]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]int)
+		v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]int)
+		fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]int, containerLen)
+		} else {
+			v = make(map[string]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]int8)
+		v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]int8)
+		fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]int8, containerLen)
+		} else {
+			v = make(map[string]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]int16)
+		v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]int16)
+		fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]int16, containerLen)
+		} else {
+			v = make(map[string]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]int32)
+		v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]int32)
+		fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]int32, containerLen)
+		} else {
+			v = make(map[string]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]int64)
+		v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]int64)
+		fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]int64, containerLen)
+		} else {
+			v = make(map[string]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]float32)
+		v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]float32)
+		fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]float32, containerLen)
+		} else {
+			v = make(map[string]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]float64)
+		v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]float64)
+		fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]float64, containerLen)
+		} else {
+			v = make(map[string]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[string]bool)
+		v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[string]bool)
+		fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[string]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[string]bool, containerLen)
+		} else {
+			v = make(map[string]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeString()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeString()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]interface{})
+		v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]interface{})
+		fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]interface{}, containerLen)
+		} else {
+			v = make(map[float32]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]string)
+		v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]string)
+		fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]string, containerLen)
+		} else {
+			v = make(map[float32]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]uint)
+		v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]uint)
+		fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]uint, containerLen)
+		} else {
+			v = make(map[float32]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]uint8)
+		v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]uint8)
+		fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]uint8, containerLen)
+		} else {
+			v = make(map[float32]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]uint16)
+		v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]uint16)
+		fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]uint16, containerLen)
+		} else {
+			v = make(map[float32]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]uint32)
+		v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]uint32)
+		fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]uint32, containerLen)
+		} else {
+			v = make(map[float32]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]uint64)
+		v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]uint64)
+		fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]uint64, containerLen)
+		} else {
+			v = make(map[float32]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]int)
+		v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]int)
+		fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]int, containerLen)
+		} else {
+			v = make(map[float32]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]int8)
+		v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]int8)
+		fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]int8, containerLen)
+		} else {
+			v = make(map[float32]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]int16)
+		v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]int16)
+		fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]int16, containerLen)
+		} else {
+			v = make(map[float32]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]int32)
+		v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]int32)
+		fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]int32, containerLen)
+		} else {
+			v = make(map[float32]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]int64)
+		v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]int64)
+		fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]int64, containerLen)
+		} else {
+			v = make(map[float32]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]float32)
+		v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]float32)
+		fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]float32, containerLen)
+		} else {
+			v = make(map[float32]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]float64)
+		v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]float64)
+		fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]float64, containerLen)
+		} else {
+			v = make(map[float32]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float32]bool)
+		v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float32]bool)
+		fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float32]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float32]bool, containerLen)
+		} else {
+			v = make(map[float32]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := float32(dd.DecodeFloat(true))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := float32(dd.DecodeFloat(true))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]interface{})
+		v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]interface{})
+		fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]interface{}, containerLen)
+		} else {
+			v = make(map[float64]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]string)
+		v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]string)
+		fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]string, containerLen)
+		} else {
+			v = make(map[float64]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]uint)
+		v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]uint)
+		fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]uint, containerLen)
+		} else {
+			v = make(map[float64]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]uint8)
+		v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]uint8)
+		fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]uint8, containerLen)
+		} else {
+			v = make(map[float64]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]uint16)
+		v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]uint16)
+		fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]uint16, containerLen)
+		} else {
+			v = make(map[float64]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]uint32)
+		v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]uint32)
+		fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]uint32, containerLen)
+		} else {
+			v = make(map[float64]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]uint64)
+		v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]uint64)
+		fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]uint64, containerLen)
+		} else {
+			v = make(map[float64]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]int)
+		v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]int)
+		fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]int, containerLen)
+		} else {
+			v = make(map[float64]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]int8)
+		v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]int8)
+		fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]int8, containerLen)
+		} else {
+			v = make(map[float64]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]int16)
+		v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]int16)
+		fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]int16, containerLen)
+		} else {
+			v = make(map[float64]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]int32)
+		v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]int32)
+		fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]int32, containerLen)
+		} else {
+			v = make(map[float64]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]int64)
+		v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]int64)
+		fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]int64, containerLen)
+		} else {
+			v = make(map[float64]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]float32)
+		v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]float32)
+		fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]float32, containerLen)
+		} else {
+			v = make(map[float64]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]float64)
+		v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]float64)
+		fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]float64, containerLen)
+		} else {
+			v = make(map[float64]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[float64]bool)
+		v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[float64]bool)
+		fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[float64]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[float64]bool, containerLen)
+		} else {
+			v = make(map[float64]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeFloat(false)
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeFloat(false)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]interface{})
+		v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]interface{})
+		fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]interface{}, containerLen)
+		} else {
+			v = make(map[uint]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]string)
+		v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]string)
+		fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]string, containerLen)
+		} else {
+			v = make(map[uint]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]uint)
+		v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]uint)
+		fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]uint, containerLen)
+		} else {
+			v = make(map[uint]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]uint8)
+		v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]uint8)
+		fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]uint8, containerLen)
+		} else {
+			v = make(map[uint]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]uint16)
+		v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]uint16)
+		fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]uint16, containerLen)
+		} else {
+			v = make(map[uint]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]uint32)
+		v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]uint32)
+		fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]uint32, containerLen)
+		} else {
+			v = make(map[uint]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]uint64)
+		v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]uint64)
+		fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]uint64, containerLen)
+		} else {
+			v = make(map[uint]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]int)
+		v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]int)
+		fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]int, containerLen)
+		} else {
+			v = make(map[uint]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]int8)
+		v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]int8)
+		fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]int8, containerLen)
+		} else {
+			v = make(map[uint]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]int16)
+		v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]int16)
+		fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]int16, containerLen)
+		} else {
+			v = make(map[uint]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]int32)
+		v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]int32)
+		fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]int32, containerLen)
+		} else {
+			v = make(map[uint]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]int64)
+		v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]int64)
+		fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]int64, containerLen)
+		} else {
+			v = make(map[uint]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]float32)
+		v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]float32)
+		fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]float32, containerLen)
+		} else {
+			v = make(map[uint]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]float64)
+		v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]float64)
+		fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]float64, containerLen)
+		} else {
+			v = make(map[uint]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint]bool)
+		v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint]bool)
+		fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint]bool, containerLen)
+		} else {
+			v = make(map[uint]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint(dd.DecodeUint(uintBitsize))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint(dd.DecodeUint(uintBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]interface{})
+		v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]interface{})
+		fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]interface{}, containerLen)
+		} else {
+			v = make(map[uint8]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]string)
+		v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]string)
+		fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]string, containerLen)
+		} else {
+			v = make(map[uint8]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]uint)
+		v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]uint)
+		fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]uint, containerLen)
+		} else {
+			v = make(map[uint8]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]uint8)
+		v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]uint8)
+		fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]uint8, containerLen)
+		} else {
+			v = make(map[uint8]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]uint16)
+		v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]uint16)
+		fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]uint16, containerLen)
+		} else {
+			v = make(map[uint8]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]uint32)
+		v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]uint32)
+		fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]uint32, containerLen)
+		} else {
+			v = make(map[uint8]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]uint64)
+		v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]uint64)
+		fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]uint64, containerLen)
+		} else {
+			v = make(map[uint8]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]int)
+		v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]int)
+		fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]int, containerLen)
+		} else {
+			v = make(map[uint8]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]int8)
+		v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]int8)
+		fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]int8, containerLen)
+		} else {
+			v = make(map[uint8]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]int16)
+		v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]int16)
+		fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]int16, containerLen)
+		} else {
+			v = make(map[uint8]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]int32)
+		v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]int32)
+		fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]int32, containerLen)
+		} else {
+			v = make(map[uint8]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]int64)
+		v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]int64)
+		fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]int64, containerLen)
+		} else {
+			v = make(map[uint8]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]float32)
+		v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]float32)
+		fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]float32, containerLen)
+		} else {
+			v = make(map[uint8]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]float64)
+		v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]float64)
+		fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]float64, containerLen)
+		} else {
+			v = make(map[uint8]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint8]bool)
+		v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint8]bool)
+		fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint8]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint8]bool, containerLen)
+		} else {
+			v = make(map[uint8]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint8(dd.DecodeUint(8))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint8(dd.DecodeUint(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]interface{})
+		v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]interface{})
+		fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]interface{}, containerLen)
+		} else {
+			v = make(map[uint16]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]string)
+		v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]string)
+		fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]string, containerLen)
+		} else {
+			v = make(map[uint16]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]uint)
+		v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]uint)
+		fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]uint, containerLen)
+		} else {
+			v = make(map[uint16]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]uint8)
+		v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]uint8)
+		fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]uint8, containerLen)
+		} else {
+			v = make(map[uint16]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]uint16)
+		v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]uint16)
+		fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]uint16, containerLen)
+		} else {
+			v = make(map[uint16]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]uint32)
+		v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]uint32)
+		fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]uint32, containerLen)
+		} else {
+			v = make(map[uint16]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]uint64)
+		v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]uint64)
+		fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]uint64, containerLen)
+		} else {
+			v = make(map[uint16]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]int)
+		v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]int)
+		fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]int, containerLen)
+		} else {
+			v = make(map[uint16]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]int8)
+		v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]int8)
+		fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]int8, containerLen)
+		} else {
+			v = make(map[uint16]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]int16)
+		v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]int16)
+		fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]int16, containerLen)
+		} else {
+			v = make(map[uint16]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]int32)
+		v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]int32)
+		fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]int32, containerLen)
+		} else {
+			v = make(map[uint16]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]int64)
+		v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]int64)
+		fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]int64, containerLen)
+		} else {
+			v = make(map[uint16]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]float32)
+		v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]float32)
+		fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]float32, containerLen)
+		} else {
+			v = make(map[uint16]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]float64)
+		v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]float64)
+		fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]float64, containerLen)
+		} else {
+			v = make(map[uint16]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint16]bool)
+		v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint16]bool)
+		fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint16]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint16]bool, containerLen)
+		} else {
+			v = make(map[uint16]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint16(dd.DecodeUint(16))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint16(dd.DecodeUint(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]interface{})
+		v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]interface{})
+		fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]interface{}, containerLen)
+		} else {
+			v = make(map[uint32]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]string)
+		v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]string)
+		fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]string, containerLen)
+		} else {
+			v = make(map[uint32]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]uint)
+		v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]uint)
+		fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]uint, containerLen)
+		} else {
+			v = make(map[uint32]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]uint8)
+		v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]uint8)
+		fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]uint8, containerLen)
+		} else {
+			v = make(map[uint32]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]uint16)
+		v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]uint16)
+		fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]uint16, containerLen)
+		} else {
+			v = make(map[uint32]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]uint32)
+		v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]uint32)
+		fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]uint32, containerLen)
+		} else {
+			v = make(map[uint32]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]uint64)
+		v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]uint64)
+		fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]uint64, containerLen)
+		} else {
+			v = make(map[uint32]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]int)
+		v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]int)
+		fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]int, containerLen)
+		} else {
+			v = make(map[uint32]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]int8)
+		v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]int8)
+		fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]int8, containerLen)
+		} else {
+			v = make(map[uint32]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]int16)
+		v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]int16)
+		fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]int16, containerLen)
+		} else {
+			v = make(map[uint32]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]int32)
+		v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]int32)
+		fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]int32, containerLen)
+		} else {
+			v = make(map[uint32]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]int64)
+		v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]int64)
+		fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]int64, containerLen)
+		} else {
+			v = make(map[uint32]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]float32)
+		v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]float32)
+		fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]float32, containerLen)
+		} else {
+			v = make(map[uint32]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]float64)
+		v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]float64)
+		fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]float64, containerLen)
+		} else {
+			v = make(map[uint32]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint32]bool)
+		v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint32]bool)
+		fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint32]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint32]bool, containerLen)
+		} else {
+			v = make(map[uint32]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := uint32(dd.DecodeUint(32))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := uint32(dd.DecodeUint(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]interface{})
+		v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]interface{})
+		fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]interface{}, containerLen)
+		} else {
+			v = make(map[uint64]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]string)
+		v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]string)
+		fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]string, containerLen)
+		} else {
+			v = make(map[uint64]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]uint)
+		v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]uint)
+		fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]uint, containerLen)
+		} else {
+			v = make(map[uint64]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]uint8)
+		v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]uint8)
+		fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]uint8, containerLen)
+		} else {
+			v = make(map[uint64]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]uint16)
+		v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]uint16)
+		fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]uint16, containerLen)
+		} else {
+			v = make(map[uint64]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]uint32)
+		v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]uint32)
+		fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]uint32, containerLen)
+		} else {
+			v = make(map[uint64]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]uint64)
+		v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]uint64)
+		fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]uint64, containerLen)
+		} else {
+			v = make(map[uint64]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]int)
+		v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]int)
+		fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]int, containerLen)
+		} else {
+			v = make(map[uint64]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]int8)
+		v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]int8)
+		fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]int8, containerLen)
+		} else {
+			v = make(map[uint64]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]int16)
+		v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]int16)
+		fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]int16, containerLen)
+		} else {
+			v = make(map[uint64]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]int32)
+		v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]int32)
+		fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]int32, containerLen)
+		} else {
+			v = make(map[uint64]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]int64)
+		v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]int64)
+		fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]int64, containerLen)
+		} else {
+			v = make(map[uint64]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]float32)
+		v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]float32)
+		fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]float32, containerLen)
+		} else {
+			v = make(map[uint64]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]float64)
+		v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]float64)
+		fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]float64, containerLen)
+		} else {
+			v = make(map[uint64]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[uint64]bool)
+		v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[uint64]bool)
+		fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[uint64]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[uint64]bool, containerLen)
+		} else {
+			v = make(map[uint64]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeUint(64)
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeUint(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]interface{})
+		v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]interface{})
+		fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]interface{}, containerLen)
+		} else {
+			v = make(map[int]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]string)
+		v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]string)
+		fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]string, containerLen)
+		} else {
+			v = make(map[int]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]uint)
+		v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]uint)
+		fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]uint, containerLen)
+		} else {
+			v = make(map[int]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]uint8)
+		v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]uint8)
+		fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntUint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]uint8, containerLen)
+		} else {
+			v = make(map[int]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]uint16)
+		v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]uint16)
+		fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]uint16, containerLen)
+		} else {
+			v = make(map[int]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]uint32)
+		v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]uint32)
+		fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]uint32, containerLen)
+		} else {
+			v = make(map[int]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]uint64)
+		v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]uint64)
+		fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]uint64, containerLen)
+		} else {
+			v = make(map[int]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]int)
+		v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]int)
+		fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]int, containerLen)
+		} else {
+			v = make(map[int]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]int8)
+		v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]int8)
+		fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]int8, containerLen)
+		} else {
+			v = make(map[int]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]int16)
+		v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]int16)
+		fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]int16, containerLen)
+		} else {
+			v = make(map[int]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]int32)
+		v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]int32)
+		fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]int32, containerLen)
+		} else {
+			v = make(map[int]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]int64)
+		v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]int64)
+		fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]int64, containerLen)
+		} else {
+			v = make(map[int]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]float32)
+		v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]float32)
+		fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]float32, containerLen)
+		} else {
+			v = make(map[int]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]float64)
+		v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]float64)
+		fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]float64, containerLen)
+		} else {
+			v = make(map[int]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int]bool)
+		v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int]bool)
+		fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapIntBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int]bool, containerLen)
+		} else {
+			v = make(map[int]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int(dd.DecodeInt(intBitsize))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int(dd.DecodeInt(intBitsize))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]interface{})
+		v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]interface{})
+		fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]interface{}, containerLen)
+		} else {
+			v = make(map[int8]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]string)
+		v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]string)
+		fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]string, containerLen)
+		} else {
+			v = make(map[int8]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]uint)
+		v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]uint)
+		fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]uint, containerLen)
+		} else {
+			v = make(map[int8]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]uint8)
+		v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]uint8)
+		fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]uint8, containerLen)
+		} else {
+			v = make(map[int8]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]uint16)
+		v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]uint16)
+		fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]uint16, containerLen)
+		} else {
+			v = make(map[int8]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]uint32)
+		v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]uint32)
+		fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]uint32, containerLen)
+		} else {
+			v = make(map[int8]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]uint64)
+		v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]uint64)
+		fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]uint64, containerLen)
+		} else {
+			v = make(map[int8]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]int)
+		v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]int)
+		fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]int, containerLen)
+		} else {
+			v = make(map[int8]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]int8)
+		v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]int8)
+		fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]int8, containerLen)
+		} else {
+			v = make(map[int8]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]int16)
+		v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]int16)
+		fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]int16, containerLen)
+		} else {
+			v = make(map[int8]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]int32)
+		v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]int32)
+		fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]int32, containerLen)
+		} else {
+			v = make(map[int8]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]int64)
+		v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]int64)
+		fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]int64, containerLen)
+		} else {
+			v = make(map[int8]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]float32)
+		v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]float32)
+		fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]float32, containerLen)
+		} else {
+			v = make(map[int8]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]float64)
+		v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]float64)
+		fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]float64, containerLen)
+		} else {
+			v = make(map[int8]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int8]bool)
+		v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int8]bool)
+		fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt8BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int8]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int8]bool, containerLen)
+		} else {
+			v = make(map[int8]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int8(dd.DecodeInt(8))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int8(dd.DecodeInt(8))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]interface{})
+		v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]interface{})
+		fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]interface{}, containerLen)
+		} else {
+			v = make(map[int16]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]string)
+		v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]string)
+		fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]string, containerLen)
+		} else {
+			v = make(map[int16]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]uint)
+		v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]uint)
+		fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]uint, containerLen)
+		} else {
+			v = make(map[int16]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]uint8)
+		v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]uint8)
+		fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]uint8, containerLen)
+		} else {
+			v = make(map[int16]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]uint16)
+		v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]uint16)
+		fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]uint16, containerLen)
+		} else {
+			v = make(map[int16]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]uint32)
+		v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]uint32)
+		fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]uint32, containerLen)
+		} else {
+			v = make(map[int16]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]uint64)
+		v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]uint64)
+		fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]uint64, containerLen)
+		} else {
+			v = make(map[int16]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]int)
+		v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]int)
+		fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]int, containerLen)
+		} else {
+			v = make(map[int16]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]int8)
+		v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]int8)
+		fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]int8, containerLen)
+		} else {
+			v = make(map[int16]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]int16)
+		v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]int16)
+		fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]int16, containerLen)
+		} else {
+			v = make(map[int16]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]int32)
+		v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]int32)
+		fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]int32, containerLen)
+		} else {
+			v = make(map[int16]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]int64)
+		v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]int64)
+		fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]int64, containerLen)
+		} else {
+			v = make(map[int16]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]float32)
+		v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]float32)
+		fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]float32, containerLen)
+		} else {
+			v = make(map[int16]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]float64)
+		v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]float64)
+		fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]float64, containerLen)
+		} else {
+			v = make(map[int16]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int16]bool)
+		v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int16]bool)
+		fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt16BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int16]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int16]bool, containerLen)
+		} else {
+			v = make(map[int16]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int16(dd.DecodeInt(16))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int16(dd.DecodeInt(16))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]interface{})
+		v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]interface{})
+		fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]interface{}, containerLen)
+		} else {
+			v = make(map[int32]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]string)
+		v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]string)
+		fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]string, containerLen)
+		} else {
+			v = make(map[int32]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]uint)
+		v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]uint)
+		fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]uint, containerLen)
+		} else {
+			v = make(map[int32]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]uint8)
+		v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]uint8)
+		fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]uint8, containerLen)
+		} else {
+			v = make(map[int32]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]uint16)
+		v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]uint16)
+		fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]uint16, containerLen)
+		} else {
+			v = make(map[int32]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]uint32)
+		v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]uint32)
+		fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]uint32, containerLen)
+		} else {
+			v = make(map[int32]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]uint64)
+		v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]uint64)
+		fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]uint64, containerLen)
+		} else {
+			v = make(map[int32]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]int)
+		v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]int)
+		fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]int, containerLen)
+		} else {
+			v = make(map[int32]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]int8)
+		v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]int8)
+		fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]int8, containerLen)
+		} else {
+			v = make(map[int32]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]int16)
+		v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]int16)
+		fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]int16, containerLen)
+		} else {
+			v = make(map[int32]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]int32)
+		v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]int32)
+		fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]int32, containerLen)
+		} else {
+			v = make(map[int32]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]int64)
+		v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]int64)
+		fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]int64, containerLen)
+		} else {
+			v = make(map[int32]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]float32)
+		v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]float32)
+		fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]float32, containerLen)
+		} else {
+			v = make(map[int32]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]float64)
+		v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]float64)
+		fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]float64, containerLen)
+		} else {
+			v = make(map[int32]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int32]bool)
+		v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int32]bool)
+		fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt32BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int32]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int32]bool, containerLen)
+		} else {
+			v = make(map[int32]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := int32(dd.DecodeInt(32))
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := int32(dd.DecodeInt(32))
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]interface{})
+		v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]interface{})
+		fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64IntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]interface{}, containerLen)
+		} else {
+			v = make(map[int64]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]string)
+		v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]string)
+		fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64StringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]string, containerLen)
+		} else {
+			v = make(map[int64]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]uint)
+		v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]uint)
+		fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64UintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]uint, containerLen)
+		} else {
+			v = make(map[int64]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]uint8)
+		v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]uint8)
+		fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Uint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]uint8, containerLen)
+		} else {
+			v = make(map[int64]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]uint16)
+		v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]uint16)
+		fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Uint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]uint16, containerLen)
+		} else {
+			v = make(map[int64]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]uint32)
+		v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]uint32)
+		fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Uint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]uint32, containerLen)
+		} else {
+			v = make(map[int64]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]uint64)
+		v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]uint64)
+		fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Uint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]uint64, containerLen)
+		} else {
+			v = make(map[int64]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]int)
+		v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]int)
+		fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64IntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]int, containerLen)
+		} else {
+			v = make(map[int64]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]int8)
+		v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]int8)
+		fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Int8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]int8, containerLen)
+		} else {
+			v = make(map[int64]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]int16)
+		v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]int16)
+		fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Int16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]int16, containerLen)
+		} else {
+			v = make(map[int64]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]int32)
+		v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]int32)
+		fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Int32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]int32, containerLen)
+		} else {
+			v = make(map[int64]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]int64)
+		v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]int64)
+		fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Int64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]int64, containerLen)
+		} else {
+			v = make(map[int64]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]float32)
+		v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]float32)
+		fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Float32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]float32, containerLen)
+		} else {
+			v = make(map[int64]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]float64)
+		v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]float64)
+		fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64Float64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]float64, containerLen)
+		} else {
+			v = make(map[int64]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[int64]bool)
+		v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[int64]bool)
+		fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapInt64BoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[int64]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[int64]bool, containerLen)
+		} else {
+			v = make(map[int64]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeInt(64)
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeInt(64)
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]interface{})
+		v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]interface{})
+		fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolIntfV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]interface{}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]interface{}, containerLen)
+		} else {
+			v = make(map[bool]interface{}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			d.decode(&mv)
+
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]string)
+		v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]string)
+		fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolStringV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]string, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]string, containerLen)
+		} else {
+			v = make(map[bool]string) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeString()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]uint)
+		v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]uint)
+		fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolUintV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]uint, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]uint, containerLen)
+		} else {
+			v = make(map[bool]uint) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint(dd.DecodeUint(uintBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]uint8)
+		v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]uint8)
+		fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolUint8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]uint8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]uint8, containerLen)
+		} else {
+			v = make(map[bool]uint8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint8(dd.DecodeUint(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]uint16)
+		v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]uint16)
+		fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolUint16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]uint16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]uint16, containerLen)
+		} else {
+			v = make(map[bool]uint16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint16(dd.DecodeUint(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]uint32)
+		v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]uint32)
+		fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolUint32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]uint32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]uint32, containerLen)
+		} else {
+			v = make(map[bool]uint32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = uint32(dd.DecodeUint(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]uint64)
+		v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]uint64)
+		fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolUint64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]uint64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]uint64, containerLen)
+		} else {
+			v = make(map[bool]uint64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeUint(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]int)
+		v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]int)
+		fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolIntV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]int, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]int, containerLen)
+		} else {
+			v = make(map[bool]int) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int(dd.DecodeInt(intBitsize))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]int8)
+		v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]int8)
+		fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolInt8V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]int8, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]int8, containerLen)
+		} else {
+			v = make(map[bool]int8) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int8(dd.DecodeInt(8))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]int16)
+		v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]int16)
+		fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolInt16V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]int16, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]int16, containerLen)
+		} else {
+			v = make(map[bool]int16) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int16(dd.DecodeInt(16))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]int32)
+		v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]int32)
+		fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolInt32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]int32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]int32, containerLen)
+		} else {
+			v = make(map[bool]int32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = int32(dd.DecodeInt(32))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]int64)
+		v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]int64)
+		fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolInt64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]int64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]int64, containerLen)
+		} else {
+			v = make(map[bool]int64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeInt(64)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]float32)
+		v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]float32)
+		fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolFloat32V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]float32, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]float32, containerLen)
+		} else {
+			v = make(map[bool]float32) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = float32(dd.DecodeFloat(true))
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]float64)
+		v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]float64)
+		fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolFloat64V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]float64, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]float64, containerLen)
+		} else {
+			v = make(map[bool]float64) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeFloat(false)
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+func (f decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) {
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[bool]bool)
+		v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[bool]bool)
+		fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) {
+	v, changed := f.DecMapBoolBoolV(*vp, checkNil, true, d)
+	if changed {
+		*vp = v
+	}
+}
+func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool,
+	d *Decoder) (_ map[bool]bool, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		}
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[bool]bool, containerLen)
+		} else {
+			v = make(map[bool]bool) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			mk := dd.DecodeBool()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			mk := dd.DecodeBool()
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			mv = dd.DecodeBool()
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}

+ 442 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl

@@ -0,0 +1,442 @@
+// //+build ignore
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+// ************************************************************
+// DO NOT EDIT. 
+// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl
+// ************************************************************
+
+package codec
+
+// Fast path functions try to create a fast path encode or decode implementation
+// for common maps and slices.
+//
+// We define the functions and register then in this single file
+// so as not to pollute the encode.go and decode.go, and create a dependency in there.
+// This file can be omitted without causing a build failure.
+//
+// The advantage of fast paths is:
+//    - Many calls bypass reflection altogether
+// 
+// Currently support
+//    - slice of all builtin types,
+//    - map of all builtin types to string or interface value
+//    - symetrical maps of all builtin types (e.g. str-str, uint8-uint8)
+// This should provide adequate "typical" implementations.
+// 
+// Note that fast track decode functions must handle values for which an address cannot be obtained.
+// For example: 
+//   m2 := map[string]int{}
+//   p2 := []interface{}{m2}
+//   // decoding into p2 will bomb if fast track functions do not treat like unaddressable.
+// 
+
+import (
+	"reflect"
+	"sort"
+)
+
+const fastpathCheckNilFalse = false // for reflect
+const fastpathCheckNilTrue = true // for type switch
+
+type fastpathT struct {}
+
+var fastpathTV fastpathT
+
+type fastpathE struct {
+	rtid uintptr
+	rt reflect.Type 
+	encfn func(encFnInfo, reflect.Value)
+	decfn func(decFnInfo, reflect.Value)
+}
+
+type fastpathA [{{ .FastpathLen }}]fastpathE
+
+func (x *fastpathA) index(rtid uintptr) int {
+	// use binary search to grab the index (adapted from sort/search.go)
+	h, i, j := 0, 0, {{ .FastpathLen }} // len(x)
+	for i < j {
+		h = i + (j-i)/2
+		if x[h].rtid < rtid {
+			i = h + 1
+		} else {
+			j = h
+		}
+	}
+	if i < {{ .FastpathLen }} && x[i].rtid == rtid {
+		return i
+	}
+	return -1
+}
+
+type fastpathAslice []fastpathE
+
+func (x fastpathAslice) Len() int { return len(x) }
+func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid }
+func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+
+var fastpathAV fastpathA
+
+// due to possible initialization loop error, make fastpath in an init()
+func init() {
+	if !fastpathEnabled {
+		return
+	}
+	i := 0
+	fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) {
+		xrt := reflect.TypeOf(v)
+		xptr := reflect.ValueOf(xrt).Pointer()
+		fastpathAV[i] = fastpathE{xptr, xrt, fe, fd}
+		i++
+		return
+	}
+	
+	{{range .Values}}{{if not .Primitive}}{{if .Slice }}
+	fn([]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}}
+	
+	{{range .Values}}{{if not .Primitive}}{{if not .Slice }}
+	fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}}
+	
+	sort.Sort(fastpathAslice(fastpathAV[:]))
+}
+
+// -- encode
+
+// -- -- fast path type switch
+func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+{{range .Values}}{{if not .Primitive}}{{if .Slice }}
+	case []{{ .Elem }}:{{else}}
+	case map[{{ .MapKey }}]{{ .Elem }}:{{end}}
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if .Slice }}
+	case *[]{{ .Elem }}:{{else}}
+	case *map[{{ .MapKey }}]{{ .Elem }}:{{end}}
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e)
+{{end}}{{end}}
+	default:
+		return false
+	}
+	return true
+}
+
+func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+{{range .Values}}{{if not .Primitive}}{{if .Slice }}
+	case []{{ .Elem }}:
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e)
+	case *[]{{ .Elem }}:
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e)
+{{end}}{{end}}{{end}}
+	default:
+		return false
+	}
+	return true
+}
+
+func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool {
+	switch v := iv.(type) {
+{{range .Values}}{{if not .Primitive}}{{if not .Slice }}
+	case map[{{ .MapKey }}]{{ .Elem }}:
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e)
+	case *map[{{ .MapKey }}]{{ .Elem }}:
+		fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e)
+{{end}}{{end}}{{end}}
+	default:
+		return false
+	}
+	return true
+}
+
+// -- -- fast path functions
+{{range .Values}}{{if not .Primitive}}{{if .Slice }} 
+
+func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) {
+	fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) {
+	ee := e.e 
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeArrayStart(len(v))
+	if e.be {
+		for _, v2 := range v {
+			{{ encmd .Elem "v2"}}
+		}
+	} else {
+		for j, v2 := range v {
+			if j > 0 {
+				ee.EncodeArrayEntrySeparator()
+			}
+			{{ encmd .Elem "v2"}}
+		}
+		ee.EncodeArrayEnd()
+	}
+}
+
+{{end}}{{end}}{{end}}
+
+{{range .Values}}{{if not .Primitive}}{{if not .Slice }}
+
+func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) {
+	fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e)
+}
+func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) {
+	ee := e.e
+	if checkNil && v == nil {
+		ee.EncodeNil()
+		return
+	}
+	ee.EncodeMapStart(len(v))
+	{{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0{{end}}
+	if e.be {
+		for k2, v2 := range v {
+			{{if eq .MapKey "string"}}if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}{{else}}{{ encmd .MapKey "k2"}}{{end}}
+			{{ encmd .Elem "v2"}}
+		}
+	} else {
+		j := 0
+		for k2, v2 := range v {
+			if j > 0 {
+				ee.EncodeMapEntrySeparator()
+			}
+			{{if eq .MapKey "string"}}if asSymbols {
+				ee.EncodeSymbol(k2)
+			} else {
+				ee.EncodeString(c_UTF8, k2)
+			}{{else}}{{ encmd .MapKey "k2"}}{{end}}
+			ee.EncodeMapKVSeparator()
+			{{ encmd .Elem "v2"}}
+			j++
+		}
+		ee.EncodeMapEnd()
+	}
+}
+
+{{end}}{{end}}{{end}}
+
+// -- decode
+
+// -- -- fast path type switch
+func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool {
+	switch v := iv.(type) {
+{{range .Values}}{{if not .Primitive}}{{if .Slice }}
+	case []{{ .Elem }}:{{else}}
+	case map[{{ .MapKey }}]{{ .Elem }}:{{end}}
+		fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if .Slice }}
+	case *[]{{ .Elem }}:{{else}}
+	case *map[{{ .MapKey }}]{{ .Elem }}:{{end}}
+		v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d)
+		if changed2 {
+			*v = v2 
+		}
+{{end}}{{end}}
+	default:
+		return false
+	}
+	return true
+}
+
+// -- -- fast path functions
+{{range .Values}}{{if not .Primitive}}{{if .Slice }}
+{{/*
+Slices can change if they 
+- did not come from an array
+- are addressable (from a ptr)
+- are settable (e.g. contained in an interface{})
+*/}}
+func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { 
+	array := f.seq == seqTypeArray
+	if !array && rv.CanAddr() { // CanSet => CanAddr + Exported 
+		vp := rv.Addr().Interface().(*[]{{ .Elem }})
+		v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().([]{{ .Elem }})
+		fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+
+func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil bool, d *Decoder) {
+	v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v 
+	}
+}
+func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, 
+	d *Decoder) (_ []{{ .Elem }}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true 
+		}
+		return nil, changed 
+	}
+
+	slh, containerLenS := d.decSliceHelperStart()
+	if canChange && v == nil {
+		if containerLenS <= 0 {
+			v = []{{ .Elem }}{}
+		} else {
+			v = make([]{{ .Elem }}, containerLenS, containerLenS)
+		}
+		changed = true
+	}
+	if containerLenS == 0 {
+		if canChange && len(v) != 0 {
+			v = v[:0]
+			changed = true 
+		}{{/*
+		// slh.End() // dd.ReadArrayEnd()
+		*/}}
+		return v, changed 
+	}
+	
+	// for j := 0; j < containerLenS; j++ {
+	if containerLenS > 0 {
+		decLen := containerLenS
+		if containerLenS > cap(v) {
+			if canChange {
+				s := make([]{{ .Elem }}, containerLenS, containerLenS)
+				// copy(s, v[:cap(v)])
+				v = s
+				changed = true
+			} else {
+				d.arrayCannotExpand(len(v), containerLenS)
+				decLen = len(v)
+			}
+		} else if containerLenS != len(v) {
+			v = v[:containerLenS]
+			changed = true
+		}
+		// all checks done. cannot go past len.
+		j := 0
+		for ; j < decLen; j++ { 
+			{{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }}
+		}
+		if !canChange {
+			for ; j < containerLenS; j++ { 
+				d.swallow()
+			}
+		}
+	} else {
+		j := 0
+		for ; !dd.CheckBreak(); j++ {
+			if j >= len(v) { 
+				if canChange {
+					v = append(v, {{ zerocmd .Elem }})
+					changed = true
+				} else {
+					d.arrayCannotExpand(len(v), j+1)
+				}
+			} 
+			if j > 0 {
+				slh.Sep(j)
+			}
+			if j < len(v) { // all checks done. cannot go past len.
+				{{ if eq .Elem "interface{}" }}d.decode(&v[j])
+				{{ else }}v[j] = {{ decmd .Elem }}{{ end }}
+			} else {
+				d.swallow()
+			}
+		}
+		slh.End() 
+	}
+	return v, changed 
+}
+
+{{end}}{{end}}{{end}}
+
+
+{{range .Values}}{{if not .Primitive}}{{if not .Slice }}
+{{/*
+Maps can change if they are
+- addressable (from a ptr)
+- settable (e.g. contained in an interface{})
+*/}}
+func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { 
+	if rv.CanAddr() {
+		vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }})
+		v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d)
+		if changed {
+			*vp = v
+		}
+	} else {
+		v := rv.Interface().(map[{{ .MapKey }}]{{ .Elem }})
+		fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d)
+	}
+}
+func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, d *Decoder) {
+	v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d)
+	if changed {
+		*vp = v 
+	}
+}
+func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, 
+	d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) {
+	dd := d.d
+	// if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil()
+	if checkNil && dd.TryDecodeAsNil() {
+		if v != nil {
+			changed = true
+		} 
+		return nil, changed
+	}
+
+	containerLen := dd.ReadMapStart()
+	if canChange && v == nil {
+		if containerLen > 0 {
+			v = make(map[{{ .MapKey }}]{{ .Elem }}, containerLen)
+		} else {
+			v = make(map[{{ .MapKey }}]{{ .Elem }}) // supports indefinite-length, etc
+		}
+		changed = true
+	}
+	if containerLen > 0 {
+		for j := 0; j < containerLen; j++ {
+			{{ if eq .MapKey "interface{}" }}var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}{{ else }}mk := {{ decmd .MapKey }}{{ end }}
+			mv := v[mk]
+			{{ if eq .Elem "interface{}" }}d.decode(&mv)
+			{{ else }}mv = {{ decmd .Elem }}{{ end }}
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+	} else if containerLen < 0 {
+		for j := 0; !dd.CheckBreak(); j++ {
+			if j > 0 {
+				dd.ReadMapEntrySeparator()
+			}
+			{{ if eq .MapKey "interface{}" }}var mk interface{}
+			d.decode(&mk)
+			if bv, bok := mk.([]byte); bok {
+				mk = string(bv) // maps cannot have []byte as key. switch to string.
+			}{{ else }}mk := {{ decmd .MapKey }}{{ end }}
+			dd.ReadMapKVSeparator()
+			mv := v[mk]
+			{{ if eq .Elem "interface{}" }}d.decode(&mv)
+			{{ else }}mv = {{ decmd .Elem }}{{ end }}
+			if v != nil {
+				v[mk] = mv
+			}
+		}
+		dd.ReadMapEnd()
+	}
+	return v, changed
+}
+
+{{end}}{{end}}{{end}}

+ 80 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl

@@ -0,0 +1,80 @@
+{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }}
+{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart()
+
+var {{var "c"}} bool
+_ = {{var "c"}}
+
+{{ if not isArray }}if {{var "v"}} == nil {
+	if {{var "l"}} <= 0 {
+        {{var "v"}} = make({{ .CTyp }}, 0)
+	} else {
+		{{var "v"}} = make({{ .CTyp }}, {{var "l"}})
+	}
+	{{var "c"}} = true 
+} 
+{{ end }}
+if {{var "l"}} == 0 { {{ if isSlice }}
+	if len({{var "v"}}) != 0 { 
+		{{var "v"}} = {{var "v"}}[:0] 
+		{{var "c"}} = true 
+	} {{ end }}
+} else if {{var "l"}} > 0 {
+	{{ if isChan }}
+	for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ {
+		var {{var "t"}} {{ .Typ }}
+		{{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }}
+		{{var "v"}} <- {{var "t"}} 
+	{{ else }} 
+	{{var "n"}} := {{var "l"}} 
+	if {{var "l"}} > cap({{var "v"}}) {
+		{{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}})
+		{{var "n"}} = len({{var "v"}})
+		{{ else }}{{ if .Immutable }}
+		{{var "v2"}} := {{var "v"}}
+		{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}})
+		if len({{var "v"}}) > 0 {
+			copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})])
+		}
+		{{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}})
+		{{ end }}{{var "c"}} = true 
+		{{ end }}
+	} else if {{var "l"}} != len({{var "v"}}) {
+		{{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}]
+		{{var "c"}} = true {{ end }}
+	}
+	{{var "j"}} := 0
+	for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ {
+		{{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
+	} {{ if isArray }}
+	for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ {
+		z.DecSwallow()
+	}{{ end }}
+	{{ end }}{{/* closing if not chan */}}
+} else {
+	for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ {
+		if {{var "j"}} >= len({{var "v"}}) {
+			{{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1)
+			{{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }}
+			{{var "c"}} = true {{ end }}
+		}
+		if {{var "j"}} > 0 {
+			{{var "h"}}.Sep({{var "j"}})
+		}
+		{{ if isChan}}
+		var {{var "t"}} {{ .Typ }}
+		{{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }}
+		{{var "v"}} <- {{var "t"}} 
+		{{ else }}
+		if {{var "j"}} < len({{var "v"}}) {
+			{{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
+		} else {
+			z.DecSwallow()
+		}
+		{{ end }}
+	}
+	{{var "h"}}.End()
+}
+{{ if not isArray }}if {{var "c"}} { 
+	*{{ .Varname }} = {{var "v"}}
+}{{ end }}
+

+ 46 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl

@@ -0,0 +1,46 @@
+{{var "v"}} := *{{ .Varname }}
+{{var "l"}} := r.ReadMapStart()
+if {{var "v"}} == nil {
+	if {{var "l"}} > 0 {
+		{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}})
+	} else {
+		{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc
+	}
+	*{{ .Varname }} = {{var "v"}}
+}
+if {{var "l"}} > 0  {
+for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ {
+	var {{var "mk"}} {{ .KTyp }} 
+	{{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }}
+{{ if eq .KTyp "interface{}" }}// special case if a byte array.
+	if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} {
+		{{var "mk"}} = string({{var "bv"}})
+	}
+{{ end }}
+	{{var "mv"}} := {{var "v"}}[{{var "mk"}}]
+	{{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }}
+	if {{var "v"}} != nil {
+		{{var "v"}}[{{var "mk"}}] = {{var "mv"}}
+	}
+}
+} else if {{var "l"}} < 0  {
+for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ {
+	if {{var "j"}} > 0 {
+		r.ReadMapEntrySeparator()
+	}
+	var {{var "mk"}} {{ .KTyp }} 
+	{{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }}
+{{ if eq .KTyp "interface{}" }}// special case if a byte array.
+	if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} {
+		{{var "mk"}} = string({{var "bv"}})
+	}
+{{ end }}
+	r.ReadMapKVSeparator()
+	{{var "mv"}} := {{var "v"}}[{{var "mk"}}]
+	{{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }}
+	if {{var "v"}} != nil {
+		{{var "v"}}[{{var "mk"}}] = {{var "mv"}}
+	}
+}
+r.ReadMapEnd()
+} // else len==0: TODO: Should we clear map entries?

+ 102 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go

@@ -0,0 +1,102 @@
+// //+build ignore
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl
+// ************************************************************
+
+package codec
+
+// This file is used to generate helper code for codecgen.
+// The values here i.e. genHelper(En|De)coder are not to be used directly by
+// library users. They WILL change continously and without notice.
+//
+// To help enforce this, we create an unexported type with exported members.
+// The only way to get the type is via the one exported type that we control (somewhat).
+//
+// When static codecs are created for types, they will use this value
+// to perform encoding or decoding of primitives or known slice or map types.
+
+// GenHelperEncoder is exported so that it can be used externally by codecgen.
+// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
+func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) {
+	return genHelperEncoder{e: e}, e.e
+}
+
+// GenHelperDecoder is exported so that it can be used externally by codecgen.
+// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
+func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) {
+	return genHelperDecoder{d: d}, d.d
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+type genHelperEncoder struct {
+	e *Encoder
+	F fastpathT
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+type genHelperDecoder struct {
+	d *Decoder
+	F fastpathT
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncBasicHandle() *BasicHandle {
+	return f.e.h
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncBinary() bool {
+	return f.e.be // f.e.hh.isBinaryEncoding()
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncFallback(iv interface{}) {
+	// println(">>>>>>>>> EncFallback")
+	f.e.encodeI(iv, false, false)
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecBasicHandle() *BasicHandle {
+	return f.d.h
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecBinary() bool {
+	return f.d.be // f.d.hh.isBinaryEncoding()
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecSwallow() {
+	f.d.swallow()
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecScratchBuffer() []byte {
+	return f.d.b[:]
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) {
+	// println(">>>>>>>>> DecFallback")
+	f.d.decodeI(iv, chkPtr, false, false, false)
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) {
+	return f.d.decSliceHelperStart()
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) {
+	f.d.structFieldNotFound(index, name)
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) {
+	f.d.arrayCannotExpand(sliceLen, streamLen)
+}

+ 250 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl

@@ -0,0 +1,250 @@
+// //+build ignore
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl
+// ************************************************************
+
+package codec
+
+// This file is used to generate helper code for codecgen. 
+// The values here i.e. genHelper(En|De)coder are not to be used directly by 
+// library users. They WILL change continously and without notice.
+// 
+// To help enforce this, we create an unexported type with exported members.
+// The only way to get the type is via the one exported type that we control (somewhat).
+// 
+// When static codecs are created for types, they will use this value
+// to perform encoding or decoding of primitives or known slice or map types.
+
+// GenHelperEncoder is exported so that it can be used externally by codecgen.
+// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
+func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) {
+	return genHelperEncoder{e:e}, e.e 
+}
+
+// GenHelperDecoder is exported so that it can be used externally by codecgen.
+// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
+func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) {
+	return genHelperDecoder{d:d}, d.d 
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+type genHelperEncoder struct {
+	e *Encoder
+	F fastpathT 
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+type genHelperDecoder struct {
+	d *Decoder
+	F fastpathT 
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncBasicHandle() *BasicHandle {
+	return f.e.h
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncBinary() bool {
+	return f.e.be // f.e.hh.isBinaryEncoding()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncFallback(iv interface{}) {
+	// println(">>>>>>>>> EncFallback")
+	f.e.encodeI(iv, false, false)
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecBasicHandle() *BasicHandle {
+	return f.d.h
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecBinary() bool {
+     return f.d.be // f.d.hh.isBinaryEncoding()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecSwallow() {
+	f.d.swallow()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecScratchBuffer() []byte {
+	return f.d.b[:]
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) {
+	// println(">>>>>>>>> DecFallback")
+	f.d.decodeI(iv, chkPtr, false, false, false)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) {
+	return f.d.decSliceHelperStart()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) {
+	f.d.structFieldNotFound(index, name)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) {
+	f.d.arrayCannotExpand(sliceLen, streamLen)
+}
+
+
+{{/*
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncDriver() encDriver {
+	return f.e.e
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecDriver() decDriver {
+     return f.d.d
+}
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncNil() {
+	f.e.e.EncodeNil()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncBytes(v []byte) {
+	f.e.e.EncodeStringBytes(c_RAW, v)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncArrayStart(length int) {
+	f.e.e.EncodeArrayStart(length)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncArrayEnd() {
+	f.e.e.EncodeArrayEnd()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncArrayEntrySeparator() {
+	f.e.e.EncodeArrayEntrySeparator()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncMapStart(length int) {
+	f.e.e.EncodeMapStart(length)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncMapEnd() {
+	f.e.e.EncodeMapEnd()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncMapEntrySeparator() {
+	f.e.e.EncodeMapEntrySeparator()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) EncMapKVSeparator() {
+	f.e.e.EncodeMapKVSeparator()
+}
+
+// ---------
+
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecBytes(v *[]byte) {
+	*v = f.d.d.DecodeBytes(*v)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecTryNil() bool {
+	return f.d.d.TryDecodeAsNil()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecContainerIsNil() (b bool) {
+	return f.d.d.IsContainerType(valueTypeNil)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecContainerIsMap() (b bool) {
+	return f.d.d.IsContainerType(valueTypeMap)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecContainerIsArray() (b bool) {
+	return f.d.d.IsContainerType(valueTypeArray)
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecCheckBreak() bool {
+	return f.d.d.CheckBreak()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecMapStart() int {
+	return f.d.d.ReadMapStart()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecArrayStart() int {
+	return f.d.d.ReadArrayStart()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecMapEnd() {
+	f.d.d.ReadMapEnd()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecArrayEnd() {
+	f.d.d.ReadArrayEnd()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecArrayEntrySeparator() {
+	f.d.d.ReadArrayEntrySeparator()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecMapEntrySeparator() {
+	f.d.d.ReadMapEntrySeparator()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) DecMapKVSeparator() {
+	f.d.d.ReadMapKVSeparator()
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) ReadStringAsBytes(bs []byte) []byte {
+	return f.d.d.DecodeStringAsBytes(bs)
+}
+
+
+// -- encode calls (primitives)
+{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) {{ .MethodNamePfx "Enc" true }}(v {{ .Primitive }}) {
+	ee := f.e.e
+	{{ encmd .Primitive "v" }}
+}
+{{ end }}{{ end }}{{ end }}
+
+// -- decode calls (primitives)
+{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) {{ .MethodNamePfx "Dec" true }}(vp *{{ .Primitive }}) {
+	dd := f.d.d
+	*vp = {{ decmd .Primitive }}
+}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) {{ .MethodNamePfx "Read" true }}() (v {{ .Primitive }}) {
+	dd := f.d.d
+	v = {{ decmd .Primitive }}
+	return
+}
+{{ end }}{{ end }}{{ end }}
+
+
+// -- encode calls (slices/maps)
+{{range .Values}}{{if not .Primitive }}{{if .Slice }}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v []{{ .Elem }}) { {{ else }}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v map[{{ .MapKey }}]{{ .Elem }}) { {{end}}
+	f.F.{{ .MethodNamePfx "Enc" false }}V(v, false, f.e)
+}
+{{ end }}{{ end }}
+
+// -- decode calls (slices/maps) 
+{{range .Values}}{{if not .Primitive }}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+{{if .Slice }}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *[]{{ .Elem }}) { 
+{{else}}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *map[{{ .MapKey }}]{{ .Elem }}) { {{end}}
+	v, changed := f.F.{{ .MethodNamePfx "Dec" false }}V(*vp, false, true, f.d)
+	if changed {
+		*vp = v 
+	}
+}
+{{ end }}{{ end }}
+*/}}

+ 139 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go

@@ -0,0 +1,139 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// DO NOT EDIT. THIS FILE IS AUTO-GENERATED FROM gen-dec-(map|array).go.tmpl
+
+const genDecMapTmpl = `
+{{var "v"}} := *{{ .Varname }}
+{{var "l"}} := r.ReadMapStart()
+if {{var "v"}} == nil {
+	if {{var "l"}} > 0 {
+		{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}})
+	} else {
+		{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc
+	}
+	*{{ .Varname }} = {{var "v"}}
+}
+if {{var "l"}} > 0  {
+for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ {
+	var {{var "mk"}} {{ .KTyp }} 
+	{{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }}
+{{ if eq .KTyp "interface{}" }}// special case if a byte array.
+	if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} {
+		{{var "mk"}} = string({{var "bv"}})
+	}
+{{ end }}
+	{{var "mv"}} := {{var "v"}}[{{var "mk"}}]
+	{{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }}
+	if {{var "v"}} != nil {
+		{{var "v"}}[{{var "mk"}}] = {{var "mv"}}
+	}
+}
+} else if {{var "l"}} < 0  {
+for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ {
+	if {{var "j"}} > 0 {
+		r.ReadMapEntrySeparator()
+	}
+	var {{var "mk"}} {{ .KTyp }} 
+	{{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }}
+{{ if eq .KTyp "interface{}" }}// special case if a byte array.
+	if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} {
+		{{var "mk"}} = string({{var "bv"}})
+	}
+{{ end }}
+	r.ReadMapKVSeparator()
+	{{var "mv"}} := {{var "v"}}[{{var "mk"}}]
+	{{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }}
+	if {{var "v"}} != nil {
+		{{var "v"}}[{{var "mk"}}] = {{var "mv"}}
+	}
+}
+r.ReadMapEnd()
+} // else len==0: TODO: Should we clear map entries?
+`
+
+const genDecListTmpl = `
+{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }}
+{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart()
+
+var {{var "c"}} bool
+_ = {{var "c"}}
+
+{{ if not isArray }}if {{var "v"}} == nil {
+	if {{var "l"}} <= 0 {
+        {{var "v"}} = make({{ .CTyp }}, 0)
+	} else {
+		{{var "v"}} = make({{ .CTyp }}, {{var "l"}})
+	}
+	{{var "c"}} = true 
+} 
+{{ end }}
+if {{var "l"}} == 0 { {{ if isSlice }}
+	if len({{var "v"}}) != 0 { 
+		{{var "v"}} = {{var "v"}}[:0] 
+		{{var "c"}} = true 
+	} {{ end }}
+} else if {{var "l"}} > 0 {
+	{{ if isChan }}
+	for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ {
+		var {{var "t"}} {{ .Typ }}
+		{{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }}
+		{{var "v"}} <- {{var "t"}} 
+	{{ else }} 
+	{{var "n"}} := {{var "l"}} 
+	if {{var "l"}} > cap({{var "v"}}) {
+		{{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}})
+		{{var "n"}} = len({{var "v"}})
+		{{ else }}{{ if .Immutable }}
+		{{var "v2"}} := {{var "v"}}
+		{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}})
+		if len({{var "v"}}) > 0 {
+			copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})])
+		}
+		{{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}})
+		{{ end }}{{var "c"}} = true 
+		{{ end }}
+	} else if {{var "l"}} != len({{var "v"}}) {
+		{{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}]
+		{{var "c"}} = true {{ end }}
+	}
+	{{var "j"}} := 0
+	for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ {
+		{{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
+	} {{ if isArray }}
+	for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ {
+		z.DecSwallow()
+	}{{ end }}
+	{{ end }}{{/* closing if not chan */}}
+} else {
+	for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ {
+		if {{var "j"}} >= len({{var "v"}}) {
+			{{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1)
+			{{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }}
+			{{var "c"}} = true {{ end }}
+		}
+		if {{var "j"}} > 0 {
+			{{var "h"}}.Sep({{var "j"}})
+		}
+		{{ if isChan}}
+		var {{var "t"}} {{ .Typ }}
+		{{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }}
+		{{var "v"}} <- {{var "t"}} 
+		{{ else }}
+		if {{var "j"}} < len({{var "v"}}) {
+			{{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
+		} else {
+			z.DecSwallow()
+		}
+		{{ end }}
+	}
+	{{var "h"}}.End()
+}
+{{ if not isArray }}if {{var "c"}} { 
+	*{{ .Varname }} = {{var "v"}}
+}{{ end }}
+
+`
+

+ 1728 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go

@@ -0,0 +1,1728 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"bytes"
+	"encoding/base64"
+	"errors"
+	"fmt"
+	"go/format"
+	"io"
+	"io/ioutil"
+	"math/rand"
+	"reflect"
+	"regexp"
+	"strconv"
+	"strings"
+	"sync"
+	"text/template"
+	"time"
+)
+
+// ---------------------------------------------------
+// codecgen only works in the following:
+//   - extensions are not supported. Do not make a type a Selfer and an extension.
+//   - Selfer takes precedence.
+//     Any type that implements it knows how to encode/decode itself statically.
+//     Extensions are only known at runtime.
+//     codecgen only looks at the Kind of the type.
+//
+//   - the following types are supported:
+//     array: [n]T
+//     slice: []T
+//     map: map[K]V
+//     primitive: [u]int[n], float(32|64), bool, string
+//     struct
+//
+// ---------------------------------------------------
+// Note that a Selfer cannot call (e|d).(En|De)code on itself,
+// as this will cause a circular reference, as (En|De)code will call Selfer methods.
+// Any type that implements Selfer must implement completely and not fallback to (En|De)code.
+//
+// In addition, code in this file manages the generation of fast-path implementations of
+// encode/decode of slices/maps of primitive keys/values.
+//
+// Users MUST re-generate their implementations whenever the code shape changes.
+// The generated code will panic if it was generated with a version older than the supporting library.
+// ---------------------------------------------------
+//
+// codec framework is very feature rich.
+// When encoding or decoding into an interface, it depends on the runtime type of the interface.
+// The type of the interface may be a named type, an extension, etc.
+// Consequently, we fallback to runtime codec for encoding/decoding interfaces.
+// In addition, we fallback for any value which cannot be guaranteed at runtime.
+// This allows us support ANY value, including any named types, specifically those which
+// do not implement our interfaces (e.g. Selfer).
+//
+// This explains some slowness compared to other code generation codecs (e.g. msgp).
+// This reduction in speed is only seen when your refers to interfaces,
+// e.g. type T struct { A interface{}; B []interface{}; C map[string]interface{} }
+//
+// codecgen will panic if the file was generated with an old version of the library in use.
+//
+// Note:
+//   It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil.
+//   This way, there isn't a function call overhead just to see that we should not enter a block of code.
+
+const GenVersion = 2 // increment this value each time codecgen changes fundamentally.
+
+const (
+	genCodecPkg   = "codec1978"
+	genTempVarPfx = "yy"
+
+	// ignore canBeNil parameter, and always set to true.
+	// This is because nil can appear anywhere, so we should always check.
+	genAnythingCanBeNil = true
+
+	// if genUseOneFunctionForDecStructMap, make a single codecDecodeSelferFromMap function;
+	// else make codecDecodeSelferFromMap{LenPrefix,CheckBreak} so that conditionals
+	// are not executed a lot.
+	//
+	// From testing, it didn't make much difference in runtime, so keep as true (one function only)
+	genUseOneFunctionForDecStructMap = true
+)
+
+var (
+	genAllTypesSamePkgErr  = errors.New("All types must be in the same package")
+	genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice")
+	genBase64enc           = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__")
+	genQNameRegex          = regexp.MustCompile(`[A-Za-z_.]+`)
+)
+
+// genRunner holds some state used during a Gen run.
+type genRunner struct {
+	w io.Writer      // output
+	c uint64         // ctr used for generating varsfx
+	t []reflect.Type // list of types to run selfer on
+
+	tc reflect.Type              // currently running selfer on this type
+	te map[uintptr]bool          // types for which the encoder has been created
+	td map[uintptr]bool          // types for which the decoder has been created
+	cp string                    // codec import path
+	im map[string]reflect.Type   // imports to add
+	is map[reflect.Type]struct{} // types seen during import search
+	bp string                    // base PkgPath, for which we are generating for
+
+	cpfx   string // codec package prefix
+	unsafe bool   // is unsafe to be used in generated code?
+
+	ts map[reflect.Type]struct{} // types for which enc/dec must be generated
+	xs string                    // top level variable/constant suffix
+	hn string                    // fn helper type name
+
+	rr *rand.Rand // random generator for file-specific types
+}
+
+// Gen will write a complete go file containing Selfer implementations for each
+// type passed. All the types must be in the same package.
+func Gen(w io.Writer, buildTags, pkgName string, useUnsafe bool, typ ...reflect.Type) {
+	if len(typ) == 0 {
+		return
+	}
+	x := genRunner{
+		unsafe: useUnsafe,
+		w:      w,
+		t:      typ,
+		te:     make(map[uintptr]bool),
+		td:     make(map[uintptr]bool),
+		im:     make(map[string]reflect.Type),
+		is:     make(map[reflect.Type]struct{}),
+		ts:     make(map[reflect.Type]struct{}),
+		bp:     typ[0].PkgPath(),
+		rr:     rand.New(rand.NewSource(time.Now().UnixNano())),
+	}
+
+	// gather imports first:
+	x.cp = reflect.TypeOf(x).PkgPath()
+	for _, t := range typ {
+		// fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name())
+		if t.PkgPath() != x.bp {
+			panic(genAllTypesSamePkgErr)
+		}
+		x.genRefPkgs(t)
+	}
+	if buildTags != "" {
+		x.line("//+build " + buildTags)
+		x.line("")
+	}
+	x.line(`
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+`)
+	x.line("package " + pkgName)
+	x.line("")
+	x.line("import (")
+	if x.cp != x.bp {
+		x.cpfx = genCodecPkg + "."
+		x.linef("%s \"%s\"", genCodecPkg, x.cp)
+	}
+	for k, _ := range x.im {
+		x.line("\"" + k + "\"")
+	}
+	// add required packages
+	for _, k := range [...]string{"reflect", "unsafe", "runtime", "fmt", "errors"} {
+		if _, ok := x.im[k]; !ok {
+			if k == "unsafe" && !x.unsafe {
+				continue
+			}
+			x.line("\"" + k + "\"")
+		}
+	}
+	x.line(")")
+	x.line("")
+
+	x.xs = strconv.FormatInt(x.rr.Int63n(9999), 10)
+
+	x.line("const (")
+	x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8))
+	x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW))
+	x.linef("codecSelverValueTypeArray%s = %v", x.xs, int64(valueTypeArray))
+	x.linef("codecSelverValueTypeMap%s = %v", x.xs, int64(valueTypeMap))
+	x.line(")")
+	x.line("var (")
+	x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())")
+	x.line("codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)")
+	x.line(")")
+	x.line("")
+
+	if x.unsafe {
+		x.line("type codecSelferUnsafeString" + x.xs + " struct { Data uintptr; Len int}")
+		x.line("")
+	}
+	x.hn = "codecSelfer" + x.xs
+	x.line("type " + x.hn + " struct{}")
+	x.line("")
+
+	x.line("func init() {")
+	x.linef("if %sGenVersion != %v {", x.cpfx, GenVersion)
+	x.line("_, file, _, _ := runtime.Caller(0)")
+	x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `)
+	x.linef(`%v, %sGenVersion, file)`, GenVersion, x.cpfx)
+	x.line("panic(err)")
+	// x.linef(`panic(fmt.Errorf("Re-run codecgen due to version mismatch: `+
+	// 	`current: %%v, need %%v, file: %%v", %v, %sGenVersion, file))`, GenVersion, x.cpfx)
+	x.linef("}")
+	x.line("if false { // reference the types, but skip this branch at build/run time")
+	var n int
+	for _, t := range x.im {
+		x.linef("var v%v %s", n, t.String())
+		n++
+	}
+	if x.unsafe {
+		x.linef("var v%v unsafe.Pointer", n)
+		n++
+	}
+	if n > 0 {
+		x.out("_")
+		for i := 1; i < n; i++ {
+			x.out(", _")
+		}
+		x.out(" = v0")
+		for i := 1; i < n; i++ {
+			x.outf(", v%v", i)
+		}
+	}
+	x.line("} ") // close if false
+	x.line("}")  // close init
+	x.line("")
+
+	// generate rest of type info
+	for _, t := range typ {
+		x.tc = t
+		x.selfer(true)
+		x.selfer(false)
+	}
+
+	for t, _ := range x.ts {
+		rtid := reflect.ValueOf(t).Pointer()
+		// generate enc functions for all these slice/map types.
+		x.linef("func (x %s) enc%s(v %s%s, e *%sEncoder) {", x.hn, x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), x.cpfx)
+		x.genRequiredMethodVars(true)
+		switch t.Kind() {
+		case reflect.Array, reflect.Slice, reflect.Chan:
+			x.encListFallback("v", t)
+		case reflect.Map:
+			x.encMapFallback("v", t)
+		default:
+			panic(genExpectArrayOrMapErr)
+		}
+		x.line("}")
+		x.line("")
+
+		// generate dec functions for all these slice/map types.
+		x.linef("func (x %s) dec%s(v *%s, d *%sDecoder) {", x.hn, x.genMethodNameT(t), x.genTypeName(t), x.cpfx)
+		x.genRequiredMethodVars(false)
+		switch t.Kind() {
+		case reflect.Array, reflect.Slice, reflect.Chan:
+			x.decListFallback("v", rtid, t)
+		case reflect.Map:
+			x.decMapFallback("v", rtid, t)
+		default:
+			panic(genExpectArrayOrMapErr)
+		}
+		x.line("}")
+		x.line("")
+	}
+
+	x.line("")
+}
+
+func (x *genRunner) arr2str(t reflect.Type, s string) string {
+	if t.Kind() == reflect.Array {
+		return s
+	}
+	return ""
+}
+
+func (x *genRunner) genRequiredMethodVars(encode bool) {
+	x.line("var h " + x.hn)
+	if encode {
+		x.line("z, r := " + x.cpfx + "GenHelperEncoder(e)")
+	} else {
+		x.line("z, r := " + x.cpfx + "GenHelperDecoder(d)")
+	}
+	x.line("_, _, _ = h, z, r")
+}
+
+func (x *genRunner) genRefPkgs(t reflect.Type) {
+	if _, ok := x.is[t]; ok {
+		return
+	}
+	// fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name())
+	x.is[t] = struct{}{}
+	tpkg, tname := t.PkgPath(), t.Name()
+	if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' {
+		x.im[tpkg] = t
+	}
+	switch t.Kind() {
+	case reflect.Array, reflect.Slice, reflect.Ptr, reflect.Chan:
+		x.genRefPkgs(t.Elem())
+	case reflect.Map:
+		x.genRefPkgs(t.Elem())
+		x.genRefPkgs(t.Key())
+	case reflect.Struct:
+		for i := 0; i < t.NumField(); i++ {
+			if fname := t.Field(i).Name; fname != "" && fname[0] >= 'A' && fname[0] <= 'Z' {
+				x.genRefPkgs(t.Field(i).Type)
+			}
+		}
+	}
+}
+
+func (x *genRunner) line(s string) {
+	x.out(s)
+	if len(s) == 0 || s[len(s)-1] != '\n' {
+		x.out("\n")
+	}
+}
+
+func (x *genRunner) varsfx() string {
+	x.c++
+	return strconv.FormatUint(x.c, 10)
+}
+
+func (x *genRunner) out(s string) {
+	if _, err := io.WriteString(x.w, s); err != nil {
+		panic(err)
+	}
+}
+
+func (x *genRunner) linef(s string, params ...interface{}) {
+	x.line(fmt.Sprintf(s, params...))
+}
+
+func (x *genRunner) outf(s string, params ...interface{}) {
+	x.out(fmt.Sprintf(s, params...))
+}
+
+func (x *genRunner) genTypeName(t reflect.Type) (n string) {
+	return genTypeName(t, x.tc)
+}
+
+func (x *genRunner) genMethodNameT(t reflect.Type) (s string) {
+	return genMethodNameT(t, x.tc)
+}
+
+func (x *genRunner) selfer(encode bool) {
+	t := x.tc
+	t0 := t
+	// always make decode use a pointer receiver,
+	// and structs always use a ptr receiver (encode|decode)
+	isptr := !encode || t.Kind() == reflect.Struct
+	fnSigPfx := "func (x "
+	if isptr {
+		fnSigPfx += "*"
+	}
+	fnSigPfx += x.genTypeName(t)
+
+	x.out(fnSigPfx)
+	if isptr {
+		t = reflect.PtrTo(t)
+	}
+	if encode {
+		x.line(") CodecEncodeSelf(e *" + x.cpfx + "Encoder) {")
+		x.genRequiredMethodVars(true)
+		// x.enc("x", t)
+		x.encVar("x", t)
+	} else {
+		x.line(") CodecDecodeSelf(d *" + x.cpfx + "Decoder) {")
+		x.genRequiredMethodVars(false)
+		// do not use decVar, as there is no need to check TryDecodeAsNil
+		// or way to elegantly handle that, and also setting it to a
+		// non-nil value doesn't affect the pointer passed.
+		// x.decVar("x", t, false)
+		x.dec("x", t0)
+	}
+	x.line("}")
+	x.line("")
+
+	if encode || t0.Kind() != reflect.Struct {
+		return
+	}
+
+	// write is containerMap
+	if genUseOneFunctionForDecStructMap {
+		x.out(fnSigPfx)
+		x.line(") codecDecodeSelfFromMap(l int, d *" + x.cpfx + "Decoder) {")
+		x.genRequiredMethodVars(false)
+		x.decStructMap("x", "l", reflect.ValueOf(t0).Pointer(), t0, 0)
+		x.line("}")
+		x.line("")
+	} else {
+		x.out(fnSigPfx)
+		x.line(") codecDecodeSelfFromMapLenPrefix(l int, d *" + x.cpfx + "Decoder) {")
+		x.genRequiredMethodVars(false)
+		x.decStructMap("x", "l", reflect.ValueOf(t0).Pointer(), t0, 1)
+		x.line("}")
+		x.line("")
+
+		x.out(fnSigPfx)
+		x.line(") codecDecodeSelfFromMapCheckBreak(l int, d *" + x.cpfx + "Decoder) {")
+		x.genRequiredMethodVars(false)
+		x.decStructMap("x", "l", reflect.ValueOf(t0).Pointer(), t0, 2)
+		x.line("}")
+		x.line("")
+	}
+
+	// write containerArray
+	x.out(fnSigPfx)
+	x.line(") codecDecodeSelfFromArray(l int, d *" + x.cpfx + "Decoder) {")
+	x.genRequiredMethodVars(false)
+	x.decStructArray("x", "l", "return", reflect.ValueOf(t0).Pointer(), t0)
+	x.line("}")
+	x.line("")
+
+}
+
+// used for chan, array, slice, map
+func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) {
+	if encode {
+		x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname)
+		// x.line("h.enc" + x.genMethodNameT(t) + "(" + x.genTypeName(t) + "(" + varname + "), e)")
+	} else {
+		x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname)
+		// x.line("h.dec" + x.genMethodNameT(t) + "((*" + x.genTypeName(t) + ")(" + varname + "), d)")
+	}
+	x.ts[t] = struct{}{}
+}
+
+// encVar will encode a variable.
+// The parameter, t, is the reflect.Type of the variable itself
+func (x *genRunner) encVar(varname string, t reflect.Type) {
+	var checkNil bool
+	switch t.Kind() {
+	case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan:
+		checkNil = true
+	}
+	if checkNil {
+		x.linef("if %s == nil { r.EncodeNil() } else { ", varname)
+	}
+	switch t.Kind() {
+	case reflect.Ptr:
+		switch t.Elem().Kind() {
+		case reflect.Struct, reflect.Array:
+			x.enc(varname, genNonPtr(t))
+		default:
+			i := x.varsfx()
+			x.line(genTempVarPfx + i + " := *" + varname)
+			x.enc(genTempVarPfx+i, genNonPtr(t))
+		}
+	case reflect.Struct, reflect.Array:
+		i := x.varsfx()
+		x.line(genTempVarPfx + i + " := &" + varname)
+		x.enc(genTempVarPfx+i, t)
+	default:
+		x.enc(varname, t)
+	}
+
+	if checkNil {
+		x.line("}")
+	}
+
+}
+
+// enc will encode a variable (varname) of type T,
+// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type *T (to prevent copying)
+func (x *genRunner) enc(varname string, t reflect.Type) {
+	// varName here must be to a pointer to a struct, or to a value directly.
+	rtid := reflect.ValueOf(t).Pointer()
+	// We call CodecEncodeSelf if one of the following are honored:
+	//   - the type already implements Selfer, call that
+	//   - the type has a Selfer implementation just created, use that
+	//   - the type is in the list of the ones we will generate for, but it is not currently being generated
+	if t.Implements(selferTyp) {
+		x.line(varname + ".CodecEncodeSelf(e)")
+		return
+	}
+	if t.Kind() == reflect.Struct && reflect.PtrTo(t).Implements(selferTyp) {
+		x.line(varname + ".CodecEncodeSelf(e)")
+		return
+	}
+	if _, ok := x.te[rtid]; ok {
+		x.line(varname + ".CodecEncodeSelf(e)")
+		return
+	}
+
+	inlist := false
+	for _, t0 := range x.t {
+		if t == t0 {
+			inlist = true
+			if t != x.tc {
+				x.line(varname + ".CodecEncodeSelf(e)")
+				return
+			}
+			break
+		}
+	}
+	var rtidAdded bool
+	if t == x.tc {
+		x.te[rtid] = true
+		rtidAdded = true
+	}
+
+	switch t.Kind() {
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		x.line("r.EncodeInt(int64(" + varname + "))")
+	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+		x.line("r.EncodeUint(uint64(" + varname + "))")
+	case reflect.Float32:
+		x.line("r.EncodeFloat32(float32(" + varname + "))")
+	case reflect.Float64:
+		x.line("r.EncodeFloat64(float64(" + varname + "))")
+	case reflect.Bool:
+		x.line("r.EncodeBool(bool(" + varname + "))")
+	case reflect.String:
+		x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(" + varname + "))")
+	case reflect.Chan:
+		x.xtraSM(varname, true, t)
+		// x.encListFallback(varname, rtid, t)
+	case reflect.Array:
+		x.xtraSM(varname, true, t)
+	case reflect.Slice:
+		// if nil, call dedicated function
+		// if a []uint8, call dedicated function
+		// if a known fastpath slice, call dedicated function
+		// else write encode function in-line.
+		// - if elements are primitives or Selfers, call dedicated function on each member.
+		// - else call Encoder.encode(XXX) on it.
+		if rtid == uint8SliceTypId {
+			x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))")
+		} else if fastpathAV.index(rtid) != -1 {
+			g := genV{Slice: true, Elem: x.genTypeName(t.Elem())}
+			x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)")
+		} else {
+			x.xtraSM(varname, true, t)
+			// x.encListFallback(varname, rtid, t)
+		}
+	case reflect.Map:
+		// if nil, call dedicated function
+		// if a known fastpath map, call dedicated function
+		// else write encode function in-line.
+		// - if elements are primitives or Selfers, call dedicated function on each member.
+		// - else call Encoder.encode(XXX) on it.
+		// x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ")
+		if fastpathAV.index(rtid) != -1 {
+			g := genV{Slice: false,
+				Elem:   x.genTypeName(t.Elem()),
+				MapKey: x.genTypeName(t.Key())}
+			x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)")
+		} else {
+			x.xtraSM(varname, true, t)
+			// x.encMapFallback(varname, rtid, t)
+		}
+	case reflect.Struct:
+		if !inlist {
+			delete(x.te, rtid)
+			x.line("z.EncFallback(" + varname + ")")
+			break
+		}
+		x.encStruct(varname, rtid, t)
+	default:
+		if rtidAdded {
+			delete(x.te, rtid)
+		}
+		x.line("z.EncFallback(" + varname + ")")
+	}
+}
+
+func (x *genRunner) encZero(t reflect.Type) {
+	switch t.Kind() {
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		x.line("r.EncodeInt(0)")
+	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+		x.line("r.EncodeUint(0)")
+	case reflect.Float32:
+		x.line("r.EncodeFloat32(0)")
+	case reflect.Float64:
+		x.line("r.EncodeFloat64(0)")
+	case reflect.Bool:
+		x.line("r.EncodeBool(false)")
+	case reflect.String:
+		x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + `, "")`)
+	default:
+		x.line("r.EncodeNil()")
+	}
+}
+
+func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) {
+	// Use knowledge from structfieldinfo (mbs, encodable fields. Ignore omitempty. )
+	// replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it
+
+	// if t === type currently running selfer on, do for all
+	ti := getTypeInfo(rtid, t)
+	i := x.varsfx()
+	sepVarname := genTempVarPfx + "sep" + i
+	firstVarname := genTempVarPfx + "first" + i
+	numfieldsvar := genTempVarPfx + "q" + i
+	ti2arrayvar := genTempVarPfx + "r" + i
+	struct2arrvar := genTempVarPfx + "2arr" + i
+
+	x.line(sepVarname + " := !z.EncBinary()")
+	x.linef("%s := z.EncBasicHandle().StructToArray", struct2arrvar)
+	x.line("var " + firstVarname + " bool")
+	tisfi := ti.sfip // always use sequence from file. decStruct expects same thing.
+	// due to omitEmpty, we need to calculate the
+	// number of non-empty things we write out first.
+	// This is required as we need to pre-determine the size of the container,
+	// to support length-prefixing.
+	x.linef("var %s [%v]bool", numfieldsvar, len(tisfi))
+	x.linef("_, _, _, _ = %s, %s, %s, %s", sepVarname, firstVarname, numfieldsvar, struct2arrvar)
+	x.linef("const %s bool = %v", ti2arrayvar, ti.toArray)
+	nn := 0
+	for j, si := range tisfi {
+		if !si.omitEmpty {
+			nn++
+			continue
+		}
+		var t2 reflect.StructField
+		var omitline string
+		if si.i != -1 {
+			t2 = t.Field(int(si.i))
+		} else {
+			t2typ := t
+			varname3 := varname
+			for _, ix := range si.is {
+				for t2typ.Kind() == reflect.Ptr {
+					t2typ = t2typ.Elem()
+				}
+				t2 = t2typ.Field(ix)
+				t2typ = t2.Type
+				varname3 = varname3 + "." + t2.Name
+				if t2typ.Kind() == reflect.Ptr {
+					omitline += varname3 + " != nil && "
+				}
+			}
+		}
+		// never check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc.
+		// also, for maps/slices/arrays, check if len ! 0 (not if == zero value)
+		switch t2.Type.Kind() {
+		case reflect.Struct:
+			omitline += " true"
+		case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan:
+			omitline += "len(" + varname + "." + t2.Name + ") != 0"
+		default:
+			omitline += varname + "." + t2.Name + " != " + genZeroValueR(t2.Type, x.tc)
+		}
+		x.linef("%s[%v] = %s", numfieldsvar, j, omitline)
+	}
+	x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray {
+	x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")")
+	x.linef("} else {") // if not ti.toArray
+	x.linef("var %snn%s int = %v", genTempVarPfx, i, nn)
+	x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i)
+	x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i)
+	// x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")")
+	x.line("}") // close if not StructToArray
+
+	for j, si := range tisfi {
+		i := x.varsfx()
+		isNilVarName := genTempVarPfx + "n" + i
+		var labelUsed bool
+		var t2 reflect.StructField
+		if si.i != -1 {
+			t2 = t.Field(int(si.i))
+		} else {
+			t2typ := t
+			varname3 := varname
+			for _, ix := range si.is {
+				// fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix)
+				for t2typ.Kind() == reflect.Ptr {
+					t2typ = t2typ.Elem()
+				}
+				t2 = t2typ.Field(ix)
+				t2typ = t2.Type
+				varname3 = varname3 + "." + t2.Name
+				if t2typ.Kind() == reflect.Ptr {
+					if !labelUsed {
+						x.line("var " + isNilVarName + " bool")
+					}
+					x.line("if " + varname3 + " == nil { " + isNilVarName + " = true ")
+					x.line("goto LABEL" + i)
+					x.line("}")
+					labelUsed = true
+					// "varname3 = new(" + x.genTypeName(t3.Elem()) + ") }")
+				}
+			}
+			// t2 = t.FieldByIndex(si.is)
+		}
+		if labelUsed {
+			x.line("LABEL" + i + ":")
+		}
+		// if the type of the field is a Selfer, or one of the ones
+
+		x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray
+		if j > 0 {
+			x.line("if " + sepVarname + " {")
+			x.line("r.EncodeArrayEntrySeparator()")
+			x.line("}")
+		}
+		if labelUsed {
+			x.line("if " + isNilVarName + " { r.EncodeNil() } else { ")
+		}
+		if si.omitEmpty {
+			x.linef("if %s[%v] {", numfieldsvar, j)
+			// omitEmptyVarNameX := genTempVarPfx + "ov" + i
+			// x.line("var " + omitEmptyVarNameX + " " + x.genTypeName(t2.Type))
+			// x.encVar(omitEmptyVarNameX, t2.Type)
+		}
+		x.encVar(varname+"."+t2.Name, t2.Type)
+		if si.omitEmpty {
+			x.linef("} else {")
+			x.encZero(t2.Type)
+			x.linef("}")
+		}
+		if labelUsed {
+			x.line("}")
+		}
+		x.linef("} else {") // if not ti.toArray
+		// omitEmptyVar := genTempVarPfx + "x" + i + t2.Name
+		// x.line("const " + omitEmptyVar + " bool = " + strconv.FormatBool(si.omitEmpty))
+		// doOmitEmpty := si.omitEmpty && t2.Type.Kind() != reflect.Struct
+		if si.omitEmpty {
+			x.linef("if %s[%v] {", numfieldsvar, j)
+			// x.linef(`println("Encoding field: %v")`, j)
+			// x.out("if ")
+			// if labelUsed {
+			// 	x.out("!" + isNilVarName + " && ")
+			// }
+			// x.line(varname + "." + t2.Name + " != " + genZeroValueR(t2.Type, x.tc) + " {")
+		}
+		if j == 0 {
+			x.linef("%s = true", firstVarname)
+		} else {
+			x.linef("if %s { r.EncodeMapEntrySeparator() } else { %s = true }", firstVarname, firstVarname)
+		}
+
+		// x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + t2.Name + "\"))")
+		x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))")
+		x.line("if " + sepVarname + " {")
+		x.line("r.EncodeMapKVSeparator()")
+		x.line("}")
+		if labelUsed {
+			x.line("if " + isNilVarName + " { r.EncodeNil() } else { ")
+			x.encVar(varname+"."+t2.Name, t2.Type)
+			x.line("}")
+		} else {
+			x.encVar(varname+"."+t2.Name, t2.Type)
+		}
+		if si.omitEmpty {
+			x.line("}")
+		}
+		x.linef("} ") // end if/else ti.toArray
+	}
+	x.line("if " + sepVarname + " {")
+	x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray {
+	x.line("r.EncodeArrayEnd()")
+	x.linef("} else {") // if not ti.toArray
+	x.line("r.EncodeMapEnd()")
+	x.linef("} ") // end if/else ti.toArray
+	x.line("}")
+}
+
+func (x *genRunner) encListFallback(varname string, t reflect.Type) {
+	i := x.varsfx()
+	g := genTempVarPfx
+	x.line("r.EncodeArrayStart(len(" + varname + "))")
+	x.line(genTempVarPfx + "s" + i + " := !z.EncBinary()")
+	x.line("if " + genTempVarPfx + "s" + i + " {")
+	if t.Kind() == reflect.Chan {
+		x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i)
+		x.linef("%sv%s := <-%s", g, i, varname)
+	} else {
+		x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname)
+	}
+	x.linef("if %si%s > 0 { r.EncodeArrayEntrySeparator() }", genTempVarPfx, i)
+	x.encVar(genTempVarPfx+"v"+i, t.Elem())
+	x.line("}")
+	x.line("r.EncodeArrayEnd()")
+	x.line("} else {")
+	if t.Kind() == reflect.Chan {
+		x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i)
+		x.linef("%sv%s := <-%s", g, i, varname)
+	} else {
+		x.line("for _, " + genTempVarPfx + "v" + i + " := range " + varname + " {")
+	}
+	x.encVar(genTempVarPfx+"v"+i, t.Elem())
+	x.line("}")
+	x.line("}")
+}
+
+func (x *genRunner) encMapFallback(varname string, t reflect.Type) {
+	i := x.varsfx()
+	x.line("r.EncodeMapStart(len(" + varname + "))")
+	x.line(genTempVarPfx + "s" + i + " := !z.EncBinary()")
+
+	x.line(genTempVarPfx + "j" + i + " := 0")
+
+	x.line("if " + genTempVarPfx + "s" + i + " {")
+
+	x.line("for " + genTempVarPfx + "k" + i + ", " +
+		genTempVarPfx + "v" + i + " := range " + varname + " {")
+	x.line("if " + genTempVarPfx + "j" + i + " > 0 { r.EncodeMapEntrySeparator() }")
+	x.encVar(genTempVarPfx+"k"+i, t.Key())
+	x.line("r.EncodeMapKVSeparator()")
+	x.encVar(genTempVarPfx+"v"+i, t.Elem())
+	x.line(genTempVarPfx + "j" + i + "++")
+	x.line("}")
+	x.line("r.EncodeMapEnd()")
+
+	x.line("} else {")
+	x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname)
+	x.encVar(genTempVarPfx+"k"+i, t.Key())
+	x.encVar(genTempVarPfx+"v"+i, t.Elem())
+	x.line("}")
+
+	x.line("}")
+}
+
+func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) {
+	// We only encode as nil if a nillable value.
+	// This removes some of the wasted checks for TryDecodeAsNil.
+	// We need to think about this more, to see what happens if omitempty, etc
+	// cause a nil value to be stored when something is expected.
+	// This could happen when decoding from a struct encoded as an array.
+	// For that, decVar should be called with canNil=true, to force true as its value.
+	i := x.varsfx()
+	if !canBeNil {
+		canBeNil = genAnythingCanBeNil || !genIsImmutable(t)
+	}
+	if canBeNil {
+		x.line("if r.TryDecodeAsNil() {")
+		if t.Kind() == reflect.Ptr {
+			x.line("if " + varname + " != nil { ")
+			// x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t.Elem()))
+			// x.line("*" + varname + " = " + genTempVarPfx + i)
+
+			// if varname is a field of a struct (has a dot in it),
+			// then just set it to nil
+			if strings.IndexByte(varname, '.') != -1 {
+				x.line(varname + " = nil")
+			} else {
+				x.line("*" + varname + " = " + genZeroValueR(t.Elem(), x.tc))
+			}
+			// x.line("*" + varname + " = nil")
+			x.line("}")
+
+		} else {
+			// x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t))
+			// x.line(varname + " = " + genTempVarPfx + i)
+			x.line(varname + " = " + genZeroValueR(t, x.tc))
+		}
+		x.line("} else {")
+	} else {
+		x.line("// cannot be nil")
+	}
+	if t.Kind() != reflect.Ptr {
+		if x.decTryAssignPrimitive(varname, t) {
+			x.line(genTempVarPfx + "v" + i + " := &" + varname)
+			x.dec(genTempVarPfx+"v"+i, t)
+		}
+	} else {
+		x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem()))
+		// Ensure we set underlying ptr to a non-nil value (so we can deref to it later).
+		// There's a chance of a **T in here which is nil.
+		var ptrPfx string
+		for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() {
+			ptrPfx += "*"
+			x.linef("if %s%s == nil { %s%s = new(%s)}",
+				ptrPfx, varname, ptrPfx, varname, x.genTypeName(t))
+		}
+		// if varname has [ in it, then create temp variable for this ptr thingie
+		if strings.Index(varname, "[") >= 0 {
+			varname2 := genTempVarPfx + "w" + i
+			x.line(varname2 + " := " + varname)
+			varname = varname2
+		}
+
+		if ptrPfx == "" {
+			x.dec(varname, t)
+		} else {
+			x.line(genTempVarPfx + "z" + i + " := " + ptrPfx + varname)
+			x.dec(genTempVarPfx+"z"+i, t)
+		}
+
+	}
+
+	if canBeNil {
+		x.line("} ")
+	}
+}
+
+func (x *genRunner) dec(varname string, t reflect.Type) {
+	// assumptions:
+	//   - the varname is to a pointer already. No need to take address of it
+
+	rtid := reflect.ValueOf(t).Pointer()
+	if t.Implements(selferTyp) || (t.Kind() == reflect.Struct &&
+		reflect.PtrTo(t).Implements(selferTyp)) {
+		x.line(varname + ".CodecDecodeSelf(d)")
+		return
+	}
+	if _, ok := x.td[rtid]; ok {
+		x.line(varname + ".CodecDecodeSelf(d)")
+		return
+	}
+
+	inlist := false
+	for _, t0 := range x.t {
+		if t == t0 {
+			inlist = true
+			if t != x.tc {
+				x.line(varname + ".CodecDecodeSelf(d)")
+				return
+			}
+			break
+		}
+	}
+	var rtidAdded bool
+	if t == x.tc {
+		x.td[rtid] = true
+		rtidAdded = true
+	}
+
+	// Since these are pointers, we cannot share, and have to use them one by one
+	switch t.Kind() {
+	case reflect.Int:
+		x.line("*((*int)(" + varname + ")) = int(r.DecodeInt(codecSelferBitsize" + x.xs + "))")
+		// x.line("z.DecInt((*int)(" + varname + "))")
+	case reflect.Int8:
+		x.line("*((*int8)(" + varname + ")) = int8(r.DecodeInt(8))")
+		// x.line("z.DecInt8((*int8)(" + varname + "))")
+	case reflect.Int16:
+		x.line("*((*int16)(" + varname + ")) = int16(r.DecodeInt(16))")
+		// x.line("z.DecInt16((*int16)(" + varname + "))")
+	case reflect.Int32:
+		x.line("*((*int32)(" + varname + ")) = int32(r.DecodeInt(32))")
+		// x.line("z.DecInt32((*int32)(" + varname + "))")
+	case reflect.Int64:
+		x.line("*((*int64)(" + varname + ")) = int64(r.DecodeInt(64))")
+		// x.line("z.DecInt64((*int64)(" + varname + "))")
+
+	case reflect.Uint:
+		x.line("*((*uint)(" + varname + ")) = uint(r.DecodeUint(codecSelferBitsize" + x.xs + "))")
+		// x.line("z.DecUint((*uint)(" + varname + "))")
+	case reflect.Uint8:
+		x.line("*((*uint8)(" + varname + ")) = uint8(r.DecodeUint(8))")
+		// x.line("z.DecUint8((*uint8)(" + varname + "))")
+	case reflect.Uint16:
+		x.line("*((*uint16)(" + varname + ")) = uint16(r.DecodeUint(16))")
+		//x.line("z.DecUint16((*uint16)(" + varname + "))")
+	case reflect.Uint32:
+		x.line("*((*uint32)(" + varname + ")) = uint32(r.DecodeUint(32))")
+		//x.line("z.DecUint32((*uint32)(" + varname + "))")
+	case reflect.Uint64:
+		x.line("*((*uint64)(" + varname + ")) = uint64(r.DecodeUint(64))")
+		//x.line("z.DecUint64((*uint64)(" + varname + "))")
+
+	case reflect.Float32:
+		x.line("*((*float32)(" + varname + ")) = float32(r.DecodeFloat(true))")
+		//x.line("z.DecFloat32((*float32)(" + varname + "))")
+	case reflect.Float64:
+		x.line("*((*float64)(" + varname + ")) = float64(r.DecodeFloat(false))")
+		// x.line("z.DecFloat64((*float64)(" + varname + "))")
+
+	case reflect.Bool:
+		x.line("*((*bool)(" + varname + ")) = r.DecodeBool()")
+		// x.line("z.DecBool((*bool)(" + varname + "))")
+	case reflect.String:
+		x.line("*((*string)(" + varname + ")) = r.DecodeString()")
+		// x.line("z.DecString((*string)(" + varname + "))")
+	case reflect.Array, reflect.Chan:
+		x.xtraSM(varname, false, t)
+		// x.decListFallback(varname, rtid, true, t)
+	case reflect.Slice:
+		// if a []uint8, call dedicated function
+		// if a known fastpath slice, call dedicated function
+		// else write encode function in-line.
+		// - if elements are primitives or Selfers, call dedicated function on each member.
+		// - else call Encoder.encode(XXX) on it.
+		if rtid == uint8SliceTypId {
+			x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false, false)")
+		} else if fastpathAV.index(rtid) != -1 {
+			g := genV{Slice: true, Elem: x.genTypeName(t.Elem())}
+			x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)")
+			// x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")")
+			// x.line(g.FastpathName(false) + "(" + varname + ", d)")
+		} else {
+			x.xtraSM(varname, false, t)
+			// x.decListFallback(varname, rtid, false, t)
+		}
+	case reflect.Map:
+		// if a known fastpath map, call dedicated function
+		// else write encode function in-line.
+		// - if elements are primitives or Selfers, call dedicated function on each member.
+		// - else call Encoder.encode(XXX) on it.
+		if fastpathAV.index(rtid) != -1 {
+			g := genV{Slice: false, Elem: x.genTypeName(t.Elem()), MapKey: x.genTypeName(t.Key())}
+			x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)")
+			// x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")")
+			// x.line(g.FastpathName(false) + "(" + varname + ", d)")
+		} else {
+			x.xtraSM(varname, false, t)
+			// x.decMapFallback(varname, rtid, t)
+		}
+	case reflect.Struct:
+		if inlist {
+			x.decStruct(varname, rtid, t)
+		} else {
+			// delete(x.td, rtid)
+			x.line("z.DecFallback(" + varname + ", false)")
+		}
+	default:
+		if rtidAdded {
+			delete(x.te, rtid)
+		}
+		x.line("z.DecFallback(" + varname + ", true)")
+	}
+}
+
+func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAsPtr bool) {
+	// We have to use the actual type name when doing a direct assignment.
+	// We don't have the luxury of casting the pointer to the underlying type.
+	//
+	// Consequently, in the situation of a
+	//     type Message int32
+	//     var x Message
+	//     var i int32 = 32
+	//     x = i // this will bomb
+	//     x = Message(i) // this will work
+	//     *((*int32)(&x)) = i // this will work
+	//
+	// Consequently, we replace:
+	//      case reflect.Uint32: x.line(varname + " = uint32(r.DecodeUint(32))")
+	// with:
+	//      case reflect.Uint32: x.line(varname + " = " + genTypeNamePrimitiveKind(t, x.tc) + "(r.DecodeUint(32))")
+
+	xfn := func(t reflect.Type) string {
+		return genTypeNamePrimitiveKind(t, x.tc)
+	}
+	switch t.Kind() {
+	case reflect.Int:
+		x.linef("%s = %s(r.DecodeInt(codecSelferBitsize%s))", varname, xfn(t), x.xs)
+	case reflect.Int8:
+		x.linef("%s = %s(r.DecodeInt(8))", varname, xfn(t))
+	case reflect.Int16:
+		x.linef("%s = %s(r.DecodeInt(16))", varname, xfn(t))
+	case reflect.Int32:
+		x.linef("%s = %s(r.DecodeInt(32))", varname, xfn(t))
+	case reflect.Int64:
+		x.linef("%s = %s(r.DecodeInt(64))", varname, xfn(t))
+
+	case reflect.Uint:
+		x.linef("%s = %s(r.DecodeUint(codecSelferBitsize%s))", varname, xfn(t), x.xs)
+	case reflect.Uint8:
+		x.linef("%s = %s(r.DecodeUint(8))", varname, xfn(t))
+	case reflect.Uint16:
+		x.linef("%s = %s(r.DecodeUint(16))", varname, xfn(t))
+	case reflect.Uint32:
+		x.linef("%s = %s(r.DecodeUint(32))", varname, xfn(t))
+	case reflect.Uint64:
+		x.linef("%s = %s(r.DecodeUint(64))", varname, xfn(t))
+
+	case reflect.Float32:
+		x.linef("%s = %s(r.DecodeFloat(true))", varname, xfn(t))
+	case reflect.Float64:
+		x.linef("%s = %s(r.DecodeFloat(false))", varname, xfn(t))
+
+	case reflect.Bool:
+		x.linef("%s = %s(r.DecodeBool())", varname, xfn(t))
+	case reflect.String:
+		x.linef("%s = %s(r.DecodeString())", varname, xfn(t))
+	default:
+		tryAsPtr = true
+	}
+	return
+}
+
+func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) {
+	type tstruc struct {
+		TempVar   string
+		Rand      string
+		Varname   string
+		CTyp      string
+		Typ       string
+		Immutable bool
+	}
+	telem := t.Elem()
+	ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem)}
+
+	funcs := make(template.FuncMap)
+	funcs["decLineVar"] = func(varname string) string {
+		x.decVar(varname, telem, false)
+		return ""
+	}
+	funcs["decLine"] = func(pfx string) string {
+		x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false)
+		return ""
+	}
+	funcs["var"] = func(s string) string {
+		return ts.TempVar + s + ts.Rand
+	}
+	funcs["zero"] = func() string {
+		return genZeroValueR(telem, x.tc)
+	}
+	funcs["isArray"] = func() bool {
+		return t.Kind() == reflect.Array
+	}
+	funcs["isSlice"] = func() bool {
+		return t.Kind() == reflect.Slice
+	}
+	funcs["isChan"] = func() bool {
+		return t.Kind() == reflect.Chan
+	}
+	tm, err := template.New("").Funcs(funcs).Parse(genDecListTmpl)
+	if err != nil {
+		panic(err)
+	}
+	if err = tm.Execute(x.w, &ts); err != nil {
+		panic(err)
+	}
+}
+
+func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) {
+	type tstruc struct {
+		TempVar string
+		Rand    string
+		Varname string
+		KTyp    string
+		Typ     string
+	}
+	telem := t.Elem()
+	tkey := t.Key()
+	ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(tkey), x.genTypeName(telem)}
+	funcs := make(template.FuncMap)
+	funcs["decLineVarK"] = func(varname string) string {
+		x.decVar(varname, tkey, false)
+		return ""
+	}
+	funcs["decLineVar"] = func(varname string) string {
+		x.decVar(varname, telem, false)
+		return ""
+	}
+	funcs["decLineK"] = func(pfx string) string {
+		x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(tkey), false)
+		return ""
+	}
+	funcs["decLine"] = func(pfx string) string {
+		x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false)
+		return ""
+	}
+	funcs["var"] = func(s string) string {
+		return ts.TempVar + s + ts.Rand
+	}
+
+	tm, err := template.New("").Funcs(funcs).Parse(genDecMapTmpl)
+	if err != nil {
+		panic(err)
+	}
+	if err = tm.Execute(x.w, &ts); err != nil {
+		panic(err)
+	}
+}
+
+func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) {
+	ti := getTypeInfo(rtid, t)
+	tisfi := ti.sfip // always use sequence from file. decStruct expects same thing.
+	x.line("switch (" + kName + ") {")
+	for _, si := range tisfi {
+		x.line("case \"" + si.encName + "\":")
+		var t2 reflect.StructField
+		if si.i != -1 {
+			t2 = t.Field(int(si.i))
+		} else {
+			// t2 = t.FieldByIndex(si.is)
+			t2typ := t
+			varname3 := varname
+			for _, ix := range si.is {
+				for t2typ.Kind() == reflect.Ptr {
+					t2typ = t2typ.Elem()
+				}
+				t2 = t2typ.Field(ix)
+				t2typ = t2.Type
+				varname3 = varname3 + "." + t2.Name
+				if t2typ.Kind() == reflect.Ptr {
+					x.line("if " + varname3 + " == nil {" +
+						varname3 + " = new(" + x.genTypeName(t2typ.Elem()) + ") }")
+				}
+			}
+		}
+		x.decVar(varname+"."+t2.Name, t2.Type, false)
+	}
+	x.line("default:")
+	// pass the slice here, so that the string will not escape, and maybe save allocation
+	x.line("z.DecStructFieldNotFound(-1, " + kName + ")")
+	// x.line("z.DecStructFieldNotFoundB(" + kName + "Slc)")
+	x.line("} // end switch " + kName)
+}
+
+func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style uint8) {
+	tpfx := genTempVarPfx
+	i := x.varsfx()
+	kName := tpfx + "s" + i
+
+	// We thought to use ReadStringAsBytes, as go compiler might optimize the copy out.
+	// However, using that was more expensive, as it seems that the switch expression
+	// is evaluated each time.
+	//
+	// We could depend on decodeString using a temporary/shared buffer internally.
+	// However, this model of creating a byte array, and using explicitly is faster,
+	// and allows optional use of unsafe []byte->string conversion without alloc.
+
+	// Also, ensure that the slice array doesn't escape.
+	// That will help escape analysis prevent allocation when it gets better.
+
+	// x.line("var " + kName + "Arr = [32]byte{} // default string to decode into")
+	// x.line("var " + kName + "Slc = " + kName + "Arr[:] // default slice to decode into")
+	// use the scratch buffer to avoid allocation (most field names are < 32).
+
+	x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into")
+
+	// x.line("var " + kName + " string // default string to decode into")
+	// x.line("_ = " + kName)
+	x.line("_ = " + kName + "Slc")
+	// x.linef("var %sb%s bool", tpfx, i)                        // break
+	switch style {
+	case 1:
+		x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i)
+	case 2:
+		x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i)
+		x.linef("if %sj%s > 0 { r.ReadMapEntrySeparator() }", tpfx, i)
+	default: // 0, otherwise.
+		x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length
+		x.linef("for %sj%s := 0; ; %sj%s++ {", tpfx, i, tpfx, i)
+		x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname)
+		x.linef("} else { if r.CheckBreak() { break }; if %sj%s > 0 { r.ReadMapEntrySeparator() } }",
+			tpfx, i)
+	}
+	// x.line(kName + " = z.ReadStringAsBytes(" + kName + ")")
+	// x.line(kName + " = z.ReadString()")
+	x.line(kName + "Slc = r.DecodeBytes(" + kName + "Slc, true, true)")
+	// let string be scoped to this loop alone, so it doesn't escape.
+	// x.line(kName + " := " + x.cpfx + "GenBytesToStringRO(" + kName + "Slc)")
+	if x.unsafe {
+		x.line(kName + "SlcHdr := codecSelferUnsafeString" + x.xs + "{uintptr(unsafe.Pointer(&" +
+			kName + "Slc[0])), len(" + kName + "Slc)}")
+		x.line(kName + " := *(*string)(unsafe.Pointer(&" + kName + "SlcHdr))")
+	} else {
+		x.line(kName + " := string(" + kName + "Slc)")
+	}
+	switch style {
+	case 1:
+	case 2:
+		x.line("r.ReadMapKVSeparator()")
+	default:
+		x.linef("if !%shl%s { r.ReadMapKVSeparator() }", tpfx, i)
+	}
+	x.decStructMapSwitch(kName, varname, rtid, t)
+
+	x.line("} // end for " + tpfx + "j" + i)
+	switch style {
+	case 1:
+	case 2:
+		x.line("r.ReadMapEnd()")
+	default:
+		x.linef("if !%shl%s { r.ReadMapEnd() }", tpfx, i)
+	}
+}
+
+func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) {
+	tpfx := genTempVarPfx
+	i := x.varsfx()
+	ti := getTypeInfo(rtid, t)
+	tisfi := ti.sfip // always use sequence from file. decStruct expects same thing.
+	x.linef("var %sj%s int", tpfx, i)
+	x.linef("var %sb%s bool", tpfx, i) // break
+	// x.linef("var %sl%s := r.ReadArrayStart()", tpfx, i)
+	x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length
+	for j, si := range tisfi {
+		var t2 reflect.StructField
+		if si.i != -1 {
+			t2 = t.Field(int(si.i))
+		} else {
+			t2 = t.FieldByIndex(si.is)
+		}
+
+		x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }",
+			tpfx, i, tpfx, i, tpfx, i,
+			tpfx, i, lenvarname, tpfx, i)
+		// x.line("if " + tpfx + "j" + i + "++; " + tpfx + "j" +
+		// i + " <=  " + tpfx + "l" + i + " {")
+		x.linef("if %sb%s { r.ReadArrayEnd(); %s }", tpfx, i, breakString)
+		if j > 0 {
+			x.line("r.ReadArrayEntrySeparator()")
+		}
+		x.decVar(varname+"."+t2.Name, t2.Type, true)
+		// x.line("} // end if " + tpfx + "j" + i + " <=  " + tpfx + "l" + i)
+	}
+	// read remaining values and throw away.
+	x.line("for {")
+	x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }",
+		tpfx, i, tpfx, i, tpfx, i,
+		tpfx, i, lenvarname, tpfx, i)
+	x.linef("if %sb%s { break }", tpfx, i)
+	x.linef("if %sj%s > 1 { r.ReadArrayEntrySeparator() }", tpfx, i)
+	x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i)
+	x.line("}")
+	x.line("r.ReadArrayEnd()")
+}
+
+func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) {
+	// if container is map
+	// x.line("if z.DecContainerIsMap() { ")
+	i := x.varsfx()
+	x.line("if r.IsContainerType(codecSelverValueTypeMap" + x.xs + ") {")
+	x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()")
+	x.linef("if %sl%s == 0 {", genTempVarPfx, i)
+	x.line("r.ReadMapEnd()")
+	if genUseOneFunctionForDecStructMap {
+		x.line("} else { ")
+		x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i)
+	} else {
+		x.line("} else if " + genTempVarPfx + "l" + i + " > 0 { ")
+		x.line("x.codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)")
+		x.line("} else {")
+		x.line("x.codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)")
+	}
+	x.line("}")
+
+	// else if container is array
+	// x.line("} else if z.DecContainerIsArray() { ")
+	x.line("} else if r.IsContainerType(codecSelverValueTypeArray" + x.xs + ") {")
+	x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()")
+	x.linef("if %sl%s == 0 {", genTempVarPfx, i)
+	x.line("r.ReadArrayEnd()")
+	x.line("} else { ")
+	x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i)
+	x.line("}")
+	// else panic
+	x.line("} else { ")
+	x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")")
+	// x.line("panic(`only encoded map or array can be decoded into a struct`)")
+	x.line("} ")
+}
+
+// --------
+
+type genV struct {
+	// genV is either a primitive (Primitive != "") or a slice (Slice = true) or a map.
+	Slice     bool
+	MapKey    string
+	Elem      string
+	Primitive string
+}
+
+func (x *genV) MethodNamePfx(prefix string, prim bool) string {
+	var name []byte
+	if prefix != "" {
+		name = append(name, prefix...)
+	}
+	if prim {
+		name = append(name, genTitleCaseName(x.Primitive)...)
+	} else {
+		if x.Slice {
+			name = append(name, "Slice"...)
+		} else {
+			name = append(name, "Map"...)
+			name = append(name, genTitleCaseName(x.MapKey)...)
+		}
+		name = append(name, genTitleCaseName(x.Elem)...)
+	}
+	return string(name)
+
+}
+
+func genNonPtr(t reflect.Type) reflect.Type {
+	for t.Kind() == reflect.Ptr {
+		t = t.Elem()
+	}
+	return t
+}
+
+func genTitleCaseName(s string) string {
+	switch s {
+	case "interface{}":
+		return "Intf"
+	default:
+		return strings.ToUpper(s[0:1]) + s[1:]
+	}
+}
+
+func genTypeNamePrimitiveKind(t reflect.Type, tRef reflect.Type) (n string) {
+	if tRef != nil && t.PkgPath() == tRef.PkgPath() && t.Name() != "" {
+		return t.Name()
+	} else {
+		return t.String() // best way to get the package name inclusive
+	}
+}
+
+func genTypeName(t reflect.Type, tRef reflect.Type) (n string) {
+	// defer func() { fmt.Printf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }()
+
+	// if the type has a PkgPath, which doesn't match the current package,
+	// then include it.
+	// We cannot depend on t.String() because it includes current package,
+	// or t.PkgPath because it includes full import path,
+	//
+	var ptrPfx string
+	for t.Kind() == reflect.Ptr {
+		ptrPfx += "*"
+		t = t.Elem()
+	}
+	if tn := t.Name(); tn != "" {
+		return ptrPfx + genTypeNamePrimitiveKind(t, tRef)
+	}
+	switch t.Kind() {
+	case reflect.Map:
+		return ptrPfx + "map[" + genTypeName(t.Key(), tRef) + "]" + genTypeName(t.Elem(), tRef)
+	case reflect.Slice:
+		return ptrPfx + "[]" + genTypeName(t.Elem(), tRef)
+	case reflect.Array:
+		return ptrPfx + "[" + strconv.FormatInt(int64(t.Len()), 10) + "]" + genTypeName(t.Elem(), tRef)
+	case reflect.Chan:
+		return ptrPfx + t.ChanDir().String() + " " + genTypeName(t.Elem(), tRef)
+	default:
+		if t == intfTyp {
+			return ptrPfx + "interface{}"
+		} else {
+			return ptrPfx + genTypeNamePrimitiveKind(t, tRef)
+		}
+	}
+}
+
+func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) {
+	var ptrPfx string
+	for t.Kind() == reflect.Ptr {
+		ptrPfx += "Ptrto"
+		t = t.Elem()
+	}
+	if tn := t.Name(); tn != "" {
+		if tRef != nil && t.PkgPath() == tRef.PkgPath() {
+			return ptrPfx + tn
+		} else {
+			tstr := t.String()
+			if genQNameRegex.MatchString(tstr) {
+				return ptrPfx + strings.Replace(tstr, ".", "_", 1000)
+			} else {
+				return ptrPfx + genCustomTypeName(tstr)
+			}
+		}
+	}
+	switch t.Kind() {
+	case reflect.Map:
+		return ptrPfx + "Map" + genMethodNameT(t.Key(), tRef) + genMethodNameT(t.Elem(), tRef)
+	case reflect.Slice:
+		return ptrPfx + "Slice" + genMethodNameT(t.Elem(), tRef)
+	case reflect.Array:
+		return ptrPfx + "Array" + strconv.FormatInt(int64(t.Len()), 10) + genMethodNameT(t.Elem(), tRef)
+	case reflect.Chan:
+		var cx string
+		switch t.ChanDir() {
+		case reflect.SendDir:
+			cx = "ChanSend"
+		case reflect.RecvDir:
+			cx = "ChanRecv"
+		default:
+			cx = "Chan"
+		}
+		return ptrPfx + cx + genMethodNameT(t.Elem(), tRef)
+	default:
+		if t == intfTyp {
+			return ptrPfx + "Interface"
+		} else {
+			if tRef != nil && t.PkgPath() == tRef.PkgPath() {
+				if t.Name() != "" {
+					return ptrPfx + t.Name()
+				} else {
+					return ptrPfx + genCustomTypeName(t.String())
+				}
+			} else {
+				// best way to get the package name inclusive
+				// return ptrPfx + strings.Replace(t.String(), ".", "_", 1000)
+				// return ptrPfx + genBase64enc.EncodeToString([]byte(t.String()))
+				tstr := t.String()
+				if t.Name() != "" && genQNameRegex.MatchString(tstr) {
+					return ptrPfx + strings.Replace(tstr, ".", "_", 1000)
+				} else {
+					return ptrPfx + genCustomTypeName(tstr)
+				}
+			}
+		}
+	}
+}
+
+// genCustomNameForType base64encodes the t.String() value in such a way
+// that it can be used within a function name.
+func genCustomTypeName(tstr string) string {
+	len2 := genBase64enc.EncodedLen(len(tstr))
+	bufx := make([]byte, len2)
+	genBase64enc.Encode(bufx, []byte(tstr))
+	for i := len2 - 1; i >= 0; i-- {
+		if bufx[i] == '=' {
+			len2--
+		} else {
+			break
+		}
+	}
+	return string(bufx[:len2])
+}
+
+func genIsImmutable(t reflect.Type) (v bool) {
+	return isMutableKind(t.Kind())
+}
+
+func genZeroValueR(t reflect.Type, tRef reflect.Type) string {
+	// if t is a named type, w
+	switch t.Kind() {
+	case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func,
+		reflect.Slice, reflect.Map, reflect.Invalid:
+		return "nil"
+	case reflect.Bool:
+		return "false"
+	case reflect.String:
+		return `""`
+	case reflect.Struct, reflect.Array:
+		return genTypeName(t, tRef) + "{}"
+	default: // all numbers
+		return "0"
+	}
+}
+
+type genInternal struct {
+	Values []genV
+	Unsafe bool
+}
+
+func (x genInternal) FastpathLen() (l int) {
+	for _, v := range x.Values {
+		if v.Primitive == "" {
+			l++
+		}
+	}
+	return
+}
+
+func genInternalZeroValue(s string) string {
+	switch s {
+	case "interface{}":
+		return "nil"
+	case "bool":
+		return "false"
+	case "string":
+		return `""`
+	default:
+		return "0"
+	}
+}
+
+func genInternalEncCommandAsString(s string, vname string) string {
+	switch s {
+	case "uint", "uint8", "uint16", "uint32", "uint64":
+		return "ee.EncodeUint(uint64(" + vname + "))"
+	case "int", "int8", "int16", "int32", "int64":
+		return "ee.EncodeInt(int64(" + vname + "))"
+	case "string":
+		return "ee.EncodeString(c_UTF8, " + vname + ")"
+	case "float32":
+		return "ee.EncodeFloat32(" + vname + ")"
+	case "float64":
+		return "ee.EncodeFloat64(" + vname + ")"
+	case "bool":
+		return "ee.EncodeBool(" + vname + ")"
+	case "symbol":
+		return "ee.EncodeSymbol(" + vname + ")"
+	default:
+		return "e.encode(" + vname + ")"
+	}
+}
+
+func genInternalDecCommandAsString(s string) string {
+	switch s {
+	case "uint":
+		return "uint(dd.DecodeUint(uintBitsize))"
+	case "uint8":
+		return "uint8(dd.DecodeUint(8))"
+	case "uint16":
+		return "uint16(dd.DecodeUint(16))"
+	case "uint32":
+		return "uint32(dd.DecodeUint(32))"
+	case "uint64":
+		return "dd.DecodeUint(64)"
+	case "int":
+		return "int(dd.DecodeInt(intBitsize))"
+	case "int8":
+		return "int8(dd.DecodeInt(8))"
+	case "int16":
+		return "int16(dd.DecodeInt(16))"
+	case "int32":
+		return "int32(dd.DecodeInt(32))"
+	case "int64":
+		return "dd.DecodeInt(64)"
+
+	case "string":
+		return "dd.DecodeString()"
+	case "float32":
+		return "float32(dd.DecodeFloat(true))"
+	case "float64":
+		return "dd.DecodeFloat(false)"
+	case "bool":
+		return "dd.DecodeBool()"
+	default:
+		panic(errors.New("unknown type for decode: " + s))
+	}
+
+}
+
+// var genInternalMu sync.Mutex
+var genInternalV genInternal
+var genInternalTmplFuncs template.FuncMap
+var genInternalOnce sync.Once
+
+func genInternalInit() {
+	types := [...]string{
+		"interface{}",
+		"string",
+		"float32",
+		"float64",
+		"uint",
+		"uint8",
+		"uint16",
+		"uint32",
+		"uint64",
+		"int",
+		"int8",
+		"int16",
+		"int32",
+		"int64",
+		"bool",
+	}
+	// keep as slice, so it is in specific iteration order.
+	// Initial order was uint64, string, interface{}, int, int64
+	mapvaltypes := [...]string{
+		"interface{}",
+		"string",
+		"uint",
+		"uint8",
+		"uint16",
+		"uint32",
+		"uint64",
+		"int",
+		"int8",
+		"int16",
+		"int32",
+		"int64",
+		"float32",
+		"float64",
+		"bool",
+	}
+	mapvaltypes2 := make(map[string]bool)
+	for _, s := range mapvaltypes {
+		mapvaltypes2[s] = true
+	}
+	var gt genInternal
+
+	// For each slice or map type, there must be a (symetrical) Encode and Decode fast-path function
+	for _, s := range types {
+		gt.Values = append(gt.Values, genV{false, "", "", s})
+		if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already.
+			gt.Values = append(gt.Values, genV{true, "", s, ""})
+		}
+		if !mapvaltypes2[s] {
+			gt.Values = append(gt.Values, genV{false, s, s, ""})
+		}
+		for _, ms := range mapvaltypes {
+			gt.Values = append(gt.Values, genV{false, s, ms, ""})
+		}
+	}
+
+	funcs := make(template.FuncMap)
+	// funcs["haspfx"] = strings.HasPrefix
+	funcs["encmd"] = genInternalEncCommandAsString
+	funcs["decmd"] = genInternalDecCommandAsString
+	funcs["zerocmd"] = genInternalZeroValue
+
+	genInternalV = gt
+	genInternalTmplFuncs = funcs
+}
+
+// GenInternalGoFile is used to generate source files from templates.
+// It is run by the program author alone.
+// Unfortunately, it has to be exported so that it can be called from a command line tool.
+// *** DO NOT USE ***
+func GenInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) {
+	genInternalOnce.Do(genInternalInit)
+
+	gt := genInternalV
+	gt.Unsafe = !safe
+
+	t := template.New("").Funcs(genInternalTmplFuncs)
+
+	tmplstr, err := ioutil.ReadAll(r)
+	if err != nil {
+		return
+	}
+
+	if t, err = t.Parse(string(tmplstr)); err != nil {
+		return
+	}
+
+	var out bytes.Buffer
+	err = t.Execute(&out, gt)
+	if err != nil {
+		return
+	}
+
+	bout, err := format.Source(out.Bytes())
+	if err != nil {
+		w.Write(out.Bytes()) // write out if error, so we can still see.
+		// w.Write(bout) // write out if error, as much as possible, so we can still see.
+		return
+	}
+	w.Write(bout)
+	return
+}

+ 846 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go

@@ -0,0 +1,846 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// Contains code shared by both encode and decode.
+
+// Some shared ideas around encoding/decoding
+// ------------------------------------------
+//
+// If an interface{} is passed, we first do a type assertion to see if it is
+// a primitive type or a map/slice of primitive types, and use a fastpath to handle it.
+//
+// If we start with a reflect.Value, we are already in reflect.Value land and
+// will try to grab the function for the underlying Type and directly call that function.
+// This is more performant than calling reflect.Value.Interface().
+//
+// This still helps us bypass many layers of reflection, and give best performance.
+//
+// Containers
+// ------------
+// Containers in the stream are either associative arrays (key-value pairs) or
+// regular arrays (indexed by incrementing integers).
+//
+// Some streams support indefinite-length containers, and use a breaking
+// byte-sequence to denote that the container has come to an end.
+//
+// Some streams also are text-based, and use explicit separators to denote the
+// end/beginning of different values.
+//
+// During encode, we use a high-level condition to determine how to iterate through
+// the container. That decision is based on whether the container is text-based (with
+// separators) or binary (without separators). If binary, we do not even call the
+// encoding of separators.
+//
+// During decode, we use a different high-level condition to determine how to iterate
+// through the containers. That decision is based on whether the stream contained
+// a length prefix, or if it used explicit breaks. If length-prefixed, we assume that
+// it has to be binary, and we do not even try to read separators.
+//
+// The only codec that may suffer (slightly) is cbor, and only when decoding indefinite-length.
+// It may suffer because we treat it like a text-based codec, and read separators.
+// However, this read is a no-op and the cost is insignificant.
+//
+// Philosophy
+// ------------
+// On decode, this codec will update containers appropriately:
+//    - If struct, update fields from stream into fields of struct.
+//      If field in stream not found in struct, handle appropriately (based on option).
+//      If a struct field has no corresponding value in the stream, leave it AS IS.
+//      If nil in stream, set value to nil/zero value.
+//    - If map, update map from stream.
+//      If the stream value is NIL, set the map to nil.
+//    - if slice, try to update up to length of array in stream.
+//      if container len is less than stream array length,
+//      and container cannot be expanded, handled (based on option).
+//      This means you can decode 4-element stream array into 1-element array.
+//
+// ------------------------------------
+// On encode, user can specify omitEmpty. This means that the value will be omitted
+// if the zero value. The problem may occur during decode, where omitted values do not affect
+// the value being decoded into. This means that if decoding into a struct with an
+// int field with current value=5, and the field is omitted in the stream, then after
+// decoding, the value will still be 5 (not 0).
+// omitEmpty only works if you guarantee that you always decode into zero-values.
+//
+// ------------------------------------
+// We could have truncated a map to remove keys not available in the stream,
+// or set values in the struct which are not in the stream to their zero values.
+// We decided against it because there is no efficient way to do it.
+// We may introduce it as an option later.
+// However, that will require enabling it for both runtime and code generation modes.
+//
+// To support truncate, we need to do 2 passes over the container:
+//   map
+//   - first collect all keys (e.g. in k1)
+//   - for each key in stream, mark k1 that the key should not be removed
+//   - after updating map, do second pass and call delete for all keys in k1 which are not marked
+//   struct:
+//   - for each field, track the *typeInfo s1
+//   - iterate through all s1, and for each one not marked, set value to zero
+//   - this involves checking the possible anonymous fields which are nil ptrs.
+//     too much work.
+//
+// ------------------------------------------
+// Error Handling is done within the library using panic.
+//
+// This way, the code doesn't have to keep checking if an error has happened,
+// and we don't have to keep sending the error value along with each call
+// or storing it in the En|Decoder and checking it constantly along the way.
+//
+// The disadvantage is that small functions which use panics cannot be inlined.
+// The code accounts for that by only using panics behind an interface;
+// since interface calls cannot be inlined, this is irrelevant.
+//
+// We considered storing the error is En|Decoder.
+//   - once it has its err field set, it cannot be used again.
+//   - panicing will be optional, controlled by const flag.
+//   - code should always check error first and return early.
+// We eventually decided against it as it makes the code clumsier to always
+// check for these error conditions.
+
+import (
+	"encoding"
+	"encoding/binary"
+	"errors"
+	"fmt"
+	"math"
+	"reflect"
+	"sort"
+	"strings"
+	"sync"
+	"time"
+	"unicode"
+	"unicode/utf8"
+)
+
+const (
+	scratchByteArrayLen = 32
+
+	// Support encoding.(Binary|Text)(Unm|M)arshaler.
+	// This constant flag will enable or disable it.
+	supportMarshalInterfaces = true
+
+	// Each Encoder or Decoder uses a cache of functions based on conditionals,
+	// so that the conditionals are not run every time.
+	//
+	// Either a map or a slice is used to keep track of the functions.
+	// The map is more natural, but has a higher cost than a slice/array.
+	// This flag (useMapForCodecCache) controls which is used.
+	//
+	// From benchmarks, slices with linear search perform better with < 32 entries.
+	// We have typically seen a high threshold of about 24 entries.
+	useMapForCodecCache = false
+
+	// for debugging, set this to false, to catch panic traces.
+	// Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic.
+	recoverPanicToErr = true
+
+	// Fast path functions try to create a fast path encode or decode implementation
+	// for common maps and slices, by by-passing reflection altogether.
+	fastpathEnabled = true
+
+	// if checkStructForEmptyValue, check structs fields to see if an empty value.
+	// This could be an expensive call, so possibly disable it.
+	checkStructForEmptyValue = false
+
+	// if derefForIsEmptyValue, deref pointers and interfaces when checking isEmptyValue
+	derefForIsEmptyValue = false
+)
+
+var oneByteArr = [1]byte{0}
+var zeroByteSlice = oneByteArr[:0:0]
+
+type charEncoding uint8
+
+const (
+	c_RAW charEncoding = iota
+	c_UTF8
+	c_UTF16LE
+	c_UTF16BE
+	c_UTF32LE
+	c_UTF32BE
+)
+
+// valueType is the stream type
+type valueType uint8
+
+const (
+	valueTypeUnset valueType = iota
+	valueTypeNil
+	valueTypeInt
+	valueTypeUint
+	valueTypeFloat
+	valueTypeBool
+	valueTypeString
+	valueTypeSymbol
+	valueTypeBytes
+	valueTypeMap
+	valueTypeArray
+	valueTypeTimestamp
+	valueTypeExt
+
+	// valueTypeInvalid = 0xff
+)
+
+type seqType uint8
+
+const (
+	_ seqType = iota
+	seqTypeArray
+	seqTypeSlice
+	seqTypeChan
+)
+
+var (
+	bigen               = binary.BigEndian
+	structInfoFieldName = "_struct"
+
+	cachedTypeInfo      = make(map[uintptr]*typeInfo, 64)
+	cachedTypeInfoMutex sync.RWMutex
+
+	// mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil))
+	intfSliceTyp = reflect.TypeOf([]interface{}(nil))
+	intfTyp      = intfSliceTyp.Elem()
+
+	stringTyp     = reflect.TypeOf("")
+	timeTyp       = reflect.TypeOf(time.Time{})
+	rawExtTyp     = reflect.TypeOf(RawExt{})
+	uint8SliceTyp = reflect.TypeOf([]uint8(nil))
+
+	mapBySliceTyp = reflect.TypeOf((*MapBySlice)(nil)).Elem()
+
+	binaryMarshalerTyp   = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem()
+	binaryUnmarshalerTyp = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem()
+
+	textMarshalerTyp   = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
+	textUnmarshalerTyp = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
+
+	selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem()
+
+	uint8SliceTypId = reflect.ValueOf(uint8SliceTyp).Pointer()
+	rawExtTypId     = reflect.ValueOf(rawExtTyp).Pointer()
+	intfTypId       = reflect.ValueOf(intfTyp).Pointer()
+	timeTypId       = reflect.ValueOf(timeTyp).Pointer()
+	stringTypId     = reflect.ValueOf(stringTyp).Pointer()
+
+	// mapBySliceTypId  = reflect.ValueOf(mapBySliceTyp).Pointer()
+
+	intBitsize  uint8 = uint8(reflect.TypeOf(int(0)).Bits())
+	uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits())
+
+	bsAll0x00 = []byte{0, 0, 0, 0, 0, 0, 0, 0}
+	bsAll0xff = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
+
+	chkOvf checkOverflow
+
+	noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo")
+)
+
+// Selfer defines methods by which a value can encode or decode itself.
+//
+// Any type which implements Selfer will be able to encode or decode itself.
+// Consequently, during (en|de)code, this takes precedence over
+// (text|binary)(M|Unm)arshal or extension support.
+type Selfer interface {
+	CodecEncodeSelf(*Encoder)
+	CodecDecodeSelf(*Decoder)
+}
+
+// MapBySlice represents a slice which should be encoded as a map in the stream.
+// The slice contains a sequence of key-value pairs.
+// This affords storing a map in a specific sequence in the stream.
+//
+// The support of MapBySlice affords the following:
+//   - A slice type which implements MapBySlice will be encoded as a map
+//   - A slice can be decoded from a map in the stream
+type MapBySlice interface {
+	MapBySlice()
+}
+
+// WARNING: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED.
+//
+// BasicHandle encapsulates the common options and extension functions.
+type BasicHandle struct {
+	extHandle
+	EncodeOptions
+	DecodeOptions
+}
+
+func (x *BasicHandle) getBasicHandle() *BasicHandle {
+	return x
+}
+
+// Handle is the interface for a specific encoding format.
+//
+// Typically, a Handle is pre-configured before first time use,
+// and not modified while in use. Such a pre-configured Handle
+// is safe for concurrent access.
+type Handle interface {
+	getBasicHandle() *BasicHandle
+	newEncDriver(w *Encoder) encDriver
+	newDecDriver(r *Decoder) decDriver
+	isBinary() bool
+}
+
+// RawExt represents raw unprocessed extension data.
+// Some codecs will decode extension data as a *RawExt if there is no registered extension for the tag.
+//
+// Only one of Data or Value is nil. If Data is nil, then the content of the RawExt is in the Value.
+type RawExt struct {
+	Tag uint64
+	// Data is the []byte which represents the raw ext. If Data is nil, ext is exposed in Value.
+	// Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types
+	Data []byte
+	// Value represents the extension, if Data is nil.
+	// Value is used by codecs (e.g. cbor) which use the format to do custom serialization of the types.
+	Value interface{}
+}
+
+// Ext handles custom (de)serialization of custom types / extensions.
+type Ext interface {
+	// WriteExt converts a value to a []byte.
+	// It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types.
+	WriteExt(v interface{}) []byte
+
+	// ReadExt updates a value from a []byte.
+	// It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types.
+	ReadExt(dst interface{}, src []byte)
+
+	// ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64.
+	// It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types.
+	ConvertExt(v interface{}) interface{}
+
+	// UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time.
+	// It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types.
+	UpdateExt(dst interface{}, src interface{})
+}
+
+// bytesExt is a wrapper implementation to support former AddExt exported method.
+type bytesExt struct {
+	encFn func(reflect.Value) ([]byte, error)
+	decFn func(reflect.Value, []byte) error
+}
+
+func (x bytesExt) WriteExt(v interface{}) []byte {
+	// fmt.Printf(">>>>>>>>>> WriteExt: %T, %v\n", v, v)
+	bs, err := x.encFn(reflect.ValueOf(v))
+	if err != nil {
+		panic(err)
+	}
+	return bs
+}
+
+func (x bytesExt) ReadExt(v interface{}, bs []byte) {
+	// fmt.Printf(">>>>>>>>>> ReadExt: %T, %v\n", v, v)
+	if err := x.decFn(reflect.ValueOf(v), bs); err != nil {
+		panic(err)
+	}
+}
+
+func (x bytesExt) ConvertExt(v interface{}) interface{} {
+	return x.WriteExt(v)
+}
+
+func (x bytesExt) UpdateExt(dest interface{}, v interface{}) {
+	x.ReadExt(dest, v.([]byte))
+}
+
+// type errorString string
+// func (x errorString) Error() string { return string(x) }
+
+type binaryEncodingType struct{}
+
+func (_ binaryEncodingType) isBinary() bool { return true }
+
+type textEncodingType struct{}
+
+func (_ textEncodingType) isBinary() bool { return false }
+
+// noBuiltInTypes is embedded into many types which do not support builtins
+// e.g. msgpack, simple, cbor.
+type noBuiltInTypes struct{}
+
+func (_ noBuiltInTypes) IsBuiltinType(rt uintptr) bool           { return false }
+func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {}
+func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {}
+
+type noStreamingCodec struct{}
+
+func (_ noStreamingCodec) CheckBreak() bool { return false }
+
+// bigenHelper.
+// Users must already slice the x completely, because we will not reslice.
+type bigenHelper struct {
+	x []byte // must be correctly sliced to appropriate len. slicing is a cost.
+	w encWriter
+}
+
+func (z bigenHelper) writeUint16(v uint16) {
+	bigen.PutUint16(z.x, v)
+	z.w.writeb(z.x)
+}
+
+func (z bigenHelper) writeUint32(v uint32) {
+	bigen.PutUint32(z.x, v)
+	z.w.writeb(z.x)
+}
+
+func (z bigenHelper) writeUint64(v uint64) {
+	bigen.PutUint64(z.x, v)
+	z.w.writeb(z.x)
+}
+
+type extTypeTagFn struct {
+	rtid uintptr
+	rt   reflect.Type
+	tag  uint64
+	ext  Ext
+}
+
+type extHandle []*extTypeTagFn
+
+// DEPRECATED: AddExt is deprecated in favor of SetExt. It exists for compatibility only.
+//
+// AddExt registes an encode and decode function for a reflect.Type.
+// AddExt internally calls SetExt.
+// To deregister an Ext, call AddExt with nil encfn and/or nil decfn.
+func (o *extHandle) AddExt(
+	rt reflect.Type, tag byte,
+	encfn func(reflect.Value) ([]byte, error), decfn func(reflect.Value, []byte) error,
+) (err error) {
+	if encfn == nil || decfn == nil {
+		return o.SetExt(rt, uint64(tag), nil)
+	}
+	return o.SetExt(rt, uint64(tag), bytesExt{encfn, decfn})
+}
+
+// SetExt registers a tag and Ext for a reflect.Type.
+//
+// Note that the type must be a named type, and specifically not
+// a pointer or Interface. An error is returned if that is not honored.
+//
+// To Deregister an ext, call SetExt with nil Ext
+func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) {
+	// o is a pointer, because we may need to initialize it
+	if rt.PkgPath() == "" || rt.Kind() == reflect.Interface {
+		err = fmt.Errorf("codec.Handle.AddExt: Takes named type, especially not a pointer or interface: %T",
+			reflect.Zero(rt).Interface())
+		return
+	}
+
+	rtid := reflect.ValueOf(rt).Pointer()
+	for _, v := range *o {
+		if v.rtid == rtid {
+			v.tag, v.ext = tag, ext
+			return
+		}
+	}
+
+	*o = append(*o, &extTypeTagFn{rtid, rt, tag, ext})
+	return
+}
+
+func (o extHandle) getExt(rtid uintptr) *extTypeTagFn {
+	for _, v := range o {
+		if v.rtid == rtid {
+			return v
+		}
+	}
+	return nil
+}
+
+func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn {
+	for _, v := range o {
+		if v.tag == tag {
+			return v
+		}
+	}
+	return nil
+}
+
+type structFieldInfo struct {
+	encName string // encode name
+
+	// only one of 'i' or 'is' can be set. If 'i' is -1, then 'is' has been set.
+
+	is        []int // (recursive/embedded) field index in struct
+	i         int16 // field index in struct
+	omitEmpty bool
+	toArray   bool // if field is _struct, is the toArray set?
+}
+
+// rv returns the field of the struct.
+// If anonymous, it returns an Invalid
+func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value) {
+	if si.i != -1 {
+		v = v.Field(int(si.i))
+		return v
+	}
+	// replicate FieldByIndex
+	for _, x := range si.is {
+		for v.Kind() == reflect.Ptr {
+			if v.IsNil() {
+				if !update {
+					return
+				}
+				v.Set(reflect.New(v.Type().Elem()))
+			}
+			v = v.Elem()
+		}
+		v = v.Field(x)
+	}
+	return v
+}
+
+func (si *structFieldInfo) setToZeroValue(v reflect.Value) {
+	if si.i != -1 {
+		v = v.Field(int(si.i))
+		v.Set(reflect.Zero(v.Type()))
+		// v.Set(reflect.New(v.Type()).Elem())
+		// v.Set(reflect.New(v.Type()))
+	} else {
+		// replicate FieldByIndex
+		for _, x := range si.is {
+			for v.Kind() == reflect.Ptr {
+				if v.IsNil() {
+					return
+				}
+				v = v.Elem()
+			}
+			v = v.Field(x)
+		}
+		v.Set(reflect.Zero(v.Type()))
+	}
+}
+
+func parseStructFieldInfo(fname string, stag string) *structFieldInfo {
+	if fname == "" {
+		panic(noFieldNameToStructFieldInfoErr)
+	}
+	si := structFieldInfo{
+		encName: fname,
+	}
+
+	if stag != "" {
+		for i, s := range strings.Split(stag, ",") {
+			if i == 0 {
+				if s != "" {
+					si.encName = s
+				}
+			} else {
+				if s == "omitempty" {
+					si.omitEmpty = true
+				} else if s == "toarray" {
+					si.toArray = true
+				}
+			}
+		}
+	}
+	// si.encNameBs = []byte(si.encName)
+	return &si
+}
+
+type sfiSortedByEncName []*structFieldInfo
+
+func (p sfiSortedByEncName) Len() int {
+	return len(p)
+}
+
+func (p sfiSortedByEncName) Less(i, j int) bool {
+	return p[i].encName < p[j].encName
+}
+
+func (p sfiSortedByEncName) Swap(i, j int) {
+	p[i], p[j] = p[j], p[i]
+}
+
+// typeInfo keeps information about each type referenced in the encode/decode sequence.
+//
+// During an encode/decode sequence, we work as below:
+//   - If base is a built in type, en/decode base value
+//   - If base is registered as an extension, en/decode base value
+//   - If type is binary(M/Unm)arshaler, call Binary(M/Unm)arshal method
+//   - If type is text(M/Unm)arshaler, call Text(M/Unm)arshal method
+//   - Else decode appropriately based on the reflect.Kind
+type typeInfo struct {
+	sfi  []*structFieldInfo // sorted. Used when enc/dec struct to map.
+	sfip []*structFieldInfo // unsorted. Used when enc/dec struct to array.
+
+	rt   reflect.Type
+	rtid uintptr
+
+	// baseId gives pointer to the base reflect.Type, after deferencing
+	// the pointers. E.g. base type of ***time.Time is time.Time.
+	base      reflect.Type
+	baseId    uintptr
+	baseIndir int8 // number of indirections to get to base
+
+	mbs bool // base type (T or *T) is a MapBySlice
+
+	bm        bool // base type (T or *T) is a binaryMarshaler
+	bunm      bool // base type (T or *T) is a binaryUnmarshaler
+	bmIndir   int8 // number of indirections to get to binaryMarshaler type
+	bunmIndir int8 // number of indirections to get to binaryUnmarshaler type
+
+	tm        bool // base type (T or *T) is a textMarshaler
+	tunm      bool // base type (T or *T) is a textUnmarshaler
+	tmIndir   int8 // number of indirections to get to textMarshaler type
+	tunmIndir int8 // number of indirections to get to textUnmarshaler type
+
+	cs      bool // base type (T or *T) is a Selfer
+	csIndir int8 // number of indirections to get to Selfer type
+
+	toArray bool // whether this (struct) type should be encoded as an array
+}
+
+func (ti *typeInfo) indexForEncName(name string) int {
+	//tisfi := ti.sfi
+	const binarySearchThreshold = 16
+	if sfilen := len(ti.sfi); sfilen < binarySearchThreshold {
+		// linear search. faster than binary search in my testing up to 16-field structs.
+		for i, si := range ti.sfi {
+			if si.encName == name {
+				return i
+			}
+		}
+	} else {
+		// binary search. adapted from sort/search.go.
+		h, i, j := 0, 0, sfilen
+		for i < j {
+			h = i + (j-i)/2
+			if ti.sfi[h].encName < name {
+				i = h + 1
+			} else {
+				j = h
+			}
+		}
+		if i < sfilen && ti.sfi[i].encName == name {
+			return i
+		}
+	}
+	return -1
+}
+
+func getStructTag(t reflect.StructTag) (s string) {
+	// check for tags: codec, json, in that order.
+	// this allows seamless support for many configured structs.
+	s = t.Get("codec")
+	if s == "" {
+		s = t.Get("json")
+	}
+	return
+}
+
+func getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) {
+	var ok bool
+	cachedTypeInfoMutex.RLock()
+	pti, ok = cachedTypeInfo[rtid]
+	cachedTypeInfoMutex.RUnlock()
+	if ok {
+		return
+	}
+
+	cachedTypeInfoMutex.Lock()
+	defer cachedTypeInfoMutex.Unlock()
+	if pti, ok = cachedTypeInfo[rtid]; ok {
+		return
+	}
+
+	ti := typeInfo{rt: rt, rtid: rtid}
+	pti = &ti
+
+	var indir int8
+	if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok {
+		ti.bm, ti.bmIndir = true, indir
+	}
+	if ok, indir = implementsIntf(rt, binaryUnmarshalerTyp); ok {
+		ti.bunm, ti.bunmIndir = true, indir
+	}
+	if ok, indir = implementsIntf(rt, textMarshalerTyp); ok {
+		ti.tm, ti.tmIndir = true, indir
+	}
+	if ok, indir = implementsIntf(rt, textUnmarshalerTyp); ok {
+		ti.tunm, ti.tunmIndir = true, indir
+	}
+	if ok, indir = implementsIntf(rt, selferTyp); ok {
+		ti.cs, ti.csIndir = true, indir
+	}
+	if ok, _ = implementsIntf(rt, mapBySliceTyp); ok {
+		ti.mbs = true
+	}
+
+	pt := rt
+	var ptIndir int8
+	// for ; pt.Kind() == reflect.Ptr; pt, ptIndir = pt.Elem(), ptIndir+1 { }
+	for pt.Kind() == reflect.Ptr {
+		pt = pt.Elem()
+		ptIndir++
+	}
+	if ptIndir == 0 {
+		ti.base = rt
+		ti.baseId = rtid
+	} else {
+		ti.base = pt
+		ti.baseId = reflect.ValueOf(pt).Pointer()
+		ti.baseIndir = ptIndir
+	}
+
+	if rt.Kind() == reflect.Struct {
+		var siInfo *structFieldInfo
+		if f, ok := rt.FieldByName(structInfoFieldName); ok {
+			siInfo = parseStructFieldInfo(structInfoFieldName, getStructTag(f.Tag))
+			ti.toArray = siInfo.toArray
+		}
+		sfip := make([]*structFieldInfo, 0, rt.NumField())
+		rgetTypeInfo(rt, nil, make(map[string]bool, 16), &sfip, siInfo)
+
+		ti.sfip = make([]*structFieldInfo, len(sfip))
+		ti.sfi = make([]*structFieldInfo, len(sfip))
+		copy(ti.sfip, sfip)
+		sort.Sort(sfiSortedByEncName(sfip))
+		copy(ti.sfi, sfip)
+	}
+	// sfi = sfip
+	cachedTypeInfo[rtid] = pti
+	return
+}
+
+func rgetTypeInfo(rt reflect.Type, indexstack []int, fnameToHastag map[string]bool,
+	sfi *[]*structFieldInfo, siInfo *structFieldInfo,
+) {
+	for j := 0; j < rt.NumField(); j++ {
+		f := rt.Field(j)
+		// func types are skipped.
+		if tk := f.Type.Kind(); tk == reflect.Func {
+			continue
+		}
+		stag := getStructTag(f.Tag)
+		if stag == "-" {
+			continue
+		}
+		if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) {
+			continue
+		}
+		// if anonymous and there is no struct tag and its a struct (or pointer to struct), inline it.
+		if f.Anonymous && stag == "" {
+			ft := f.Type
+			for ft.Kind() == reflect.Ptr {
+				ft = ft.Elem()
+			}
+			if ft.Kind() == reflect.Struct {
+				indexstack2 := make([]int, len(indexstack)+1, len(indexstack)+4)
+				copy(indexstack2, indexstack)
+				indexstack2[len(indexstack)] = j
+				// indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j)
+				rgetTypeInfo(ft, indexstack2, fnameToHastag, sfi, siInfo)
+				continue
+			}
+		}
+		// do not let fields with same name in embedded structs override field at higher level.
+		// this must be done after anonymous check, to allow anonymous field
+		// still include their child fields
+		if _, ok := fnameToHastag[f.Name]; ok {
+			continue
+		}
+		si := parseStructFieldInfo(f.Name, stag)
+		// si.ikind = int(f.Type.Kind())
+		if len(indexstack) == 0 {
+			si.i = int16(j)
+		} else {
+			si.i = -1
+			si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j)
+		}
+
+		if siInfo != nil {
+			if siInfo.omitEmpty {
+				si.omitEmpty = true
+			}
+		}
+		*sfi = append(*sfi, si)
+		fnameToHastag[f.Name] = stag != ""
+	}
+}
+
+func panicToErr(err *error) {
+	if recoverPanicToErr {
+		if x := recover(); x != nil {
+			//debug.PrintStack()
+			panicValToErr(x, err)
+		}
+	}
+}
+
+// func doPanic(tag string, format string, params ...interface{}) {
+// 	params2 := make([]interface{}, len(params)+1)
+// 	params2[0] = tag
+// 	copy(params2[1:], params)
+// 	panic(fmt.Errorf("%s: "+format, params2...))
+// }
+
+func isMutableKind(k reflect.Kind) (v bool) {
+	return k == reflect.Int ||
+		k == reflect.Int8 ||
+		k == reflect.Int16 ||
+		k == reflect.Int32 ||
+		k == reflect.Int64 ||
+		k == reflect.Uint ||
+		k == reflect.Uint8 ||
+		k == reflect.Uint16 ||
+		k == reflect.Uint32 ||
+		k == reflect.Uint64 ||
+		k == reflect.Float32 ||
+		k == reflect.Float64 ||
+		k == reflect.Bool ||
+		k == reflect.String
+}
+
+// these functions must be inlinable, and not call anybody
+type checkOverflow struct{}
+
+func (_ checkOverflow) Float32(f float64) (overflow bool) {
+	if f < 0 {
+		f = -f
+	}
+	return math.MaxFloat32 < f && f <= math.MaxFloat64
+}
+
+func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) {
+	if bitsize == 0 || bitsize >= 64 || v == 0 {
+		return
+	}
+	if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc {
+		overflow = true
+	}
+	return
+}
+
+func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) {
+	if bitsize == 0 || bitsize >= 64 || v == 0 {
+		return
+	}
+	if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc {
+		overflow = true
+	}
+	return
+}
+
+func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) {
+	//e.g. -127 to 128 for int8
+	pos := (v >> 63) == 0
+	ui2 := v & 0x7fffffffffffffff
+	if pos {
+		if ui2 > math.MaxInt64 {
+			overflow = true
+			return
+		}
+	} else {
+		if ui2 > math.MaxInt64-1 {
+			overflow = true
+			return
+		}
+	}
+	i = int64(v)
+	return
+}

+ 151 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go

@@ -0,0 +1,151 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// All non-std package dependencies live in this file,
+// so porting to different environment is easy (just update functions).
+
+import (
+	"errors"
+	"fmt"
+	"math"
+	"reflect"
+)
+
+func panicValToErr(panicVal interface{}, err *error) {
+	if panicVal == nil {
+		return
+	}
+	// case nil
+	switch xerr := panicVal.(type) {
+	case error:
+		*err = xerr
+	case string:
+		*err = errors.New(xerr)
+	default:
+		*err = fmt.Errorf("%v", panicVal)
+	}
+	return
+}
+
+func hIsEmptyValue(v reflect.Value, deref, checkStruct bool) bool {
+	switch v.Kind() {
+	case reflect.Invalid:
+		return true
+	case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
+		return v.Len() == 0
+	case reflect.Bool:
+		return !v.Bool()
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		return v.Int() == 0
+	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+		return v.Uint() == 0
+	case reflect.Float32, reflect.Float64:
+		return v.Float() == 0
+	case reflect.Interface, reflect.Ptr:
+		if deref {
+			if v.IsNil() {
+				return true
+			}
+			return hIsEmptyValue(v.Elem(), deref, checkStruct)
+		} else {
+			return v.IsNil()
+		}
+	case reflect.Struct:
+		if !checkStruct {
+			return false
+		}
+		// return true if all fields are empty. else return false.
+		// we cannot use equality check, because some fields may be maps/slices/etc
+		// and consequently the structs are not comparable.
+		// return v.Interface() == reflect.Zero(v.Type()).Interface()
+		for i, n := 0, v.NumField(); i < n; i++ {
+			if !hIsEmptyValue(v.Field(i), deref, checkStruct) {
+				return false
+			}
+		}
+		return true
+	}
+	return false
+}
+
+func isEmptyValue(v reflect.Value) bool {
+	return hIsEmptyValue(v, derefForIsEmptyValue, checkStructForEmptyValue)
+}
+
+func pruneSignExt(v []byte, pos bool) (n int) {
+	if len(v) < 2 {
+	} else if pos && v[0] == 0 {
+		for ; v[n] == 0 && n+1 < len(v) && (v[n+1]&(1<<7) == 0); n++ {
+		}
+	} else if !pos && v[0] == 0xff {
+		for ; v[n] == 0xff && n+1 < len(v) && (v[n+1]&(1<<7) != 0); n++ {
+		}
+	}
+	return
+}
+
+func implementsIntf(typ, iTyp reflect.Type) (success bool, indir int8) {
+	if typ == nil {
+		return
+	}
+	rt := typ
+	// The type might be a pointer and we need to keep
+	// dereferencing to the base type until we find an implementation.
+	for {
+		if rt.Implements(iTyp) {
+			return true, indir
+		}
+		if p := rt; p.Kind() == reflect.Ptr {
+			indir++
+			if indir >= math.MaxInt8 { // insane number of indirections
+				return false, 0
+			}
+			rt = p.Elem()
+			continue
+		}
+		break
+	}
+	// No luck yet, but if this is a base type (non-pointer), the pointer might satisfy.
+	if typ.Kind() != reflect.Ptr {
+		// Not a pointer, but does the pointer work?
+		if reflect.PtrTo(typ).Implements(iTyp) {
+			return true, -1
+		}
+	}
+	return false, 0
+}
+
+// validate that this function is correct ...
+// culled from OGRE (Object-Oriented Graphics Rendering Engine)
+// function: halfToFloatI (http://stderr.org/doc/ogre-doc/api/OgreBitwise_8h-source.html)
+func halfFloatToFloatBits(yy uint16) (d uint32) {
+	y := uint32(yy)
+	s := (y >> 15) & 0x01
+	e := (y >> 10) & 0x1f
+	m := y & 0x03ff
+
+	if e == 0 {
+		if m == 0 { // plu or minus 0
+			return s << 31
+		} else { // Denormalized number -- renormalize it
+			for (m & 0x00000400) == 0 {
+				m <<= 1
+				e -= 1
+			}
+			e += 1
+			const zz uint32 = 0x0400
+			m &= ^zz
+		}
+	} else if e == 31 {
+		if m == 0 { // Inf
+			return (s << 31) | 0x7f800000
+		} else { // NaN
+			return (s << 31) | 0x7f800000 | (m << 13)
+		}
+	}
+	e = e + (127 - 15)
+	m = m << 13
+	return (s << 31) | (e << 23) | m
+}

+ 20 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go

@@ -0,0 +1,20 @@
+//+build !unsafe
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// stringView returns a view of the []byte as a string.
+// In unsafe mode, it doesn't incur allocation and copying caused by conversion.
+// In regular safe mode, it is an allocation and copy.
+func stringView(v []byte) string {
+	return string(v)
+}
+
+// bytesView returns a view of the string as a []byte.
+// In unsafe mode, it doesn't incur allocation and copying caused by conversion.
+// In regular safe mode, it is an allocation and copy.
+func bytesView(v string) []byte {
+	return []byte(v)
+}

+ 155 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go

@@ -0,0 +1,155 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// All non-std package dependencies related to testing live in this file,
+// so porting to different environment is easy (just update functions).
+//
+// This file sets up the variables used, including testInitFns.
+// Each file should add initialization that should be performed
+// after flags are parsed.
+//
+// init is a multi-step process:
+//   - setup vars (handled by init functions in each file)
+//   - parse flags
+//   - setup derived vars (handled by pre-init registered functions - registered in init function)
+//   - post init (handled by post-init registered functions - registered in init function)
+// This way, no one has to manage carefully control the initialization
+// using file names, etc.
+//
+// Tests which require external dependencies need the -tag=x parameter.
+// They should be run as:
+//    go test -tags=x -run=. <other parameters ...>
+// Benchmarks should also take this parameter, to include the sereal, xdr, etc.
+// To run against codecgen, etc, make sure you pass extra parameters.
+// Example usage:
+//    go test "-tags=x codecgen unsafe" -bench=. <other parameters ...>
+//
+// To fully test everything:
+//    go test -tags=x -benchtime=100ms -tv -bg -bi  -brw -bu -v -run=. -bench=.
+
+import (
+	"errors"
+	"flag"
+	"fmt"
+	"reflect"
+	"sync"
+	"testing"
+)
+
+const (
+	testLogToT    = true
+	failNowOnFail = true
+)
+
+var (
+	testNoopH      = NoopHandle(8)
+	testMsgpackH   = &MsgpackHandle{}
+	testBincH      = &BincHandle{}
+	testBincHNoSym = &BincHandle{}
+	testBincHSym   = &BincHandle{}
+	testSimpleH    = &SimpleHandle{}
+	testCborH      = &CborHandle{}
+	testJsonH      = &JsonHandle{}
+
+	testPreInitFns  []func()
+	testPostInitFns []func()
+
+	testOnce sync.Once
+)
+
+func init() {
+	testBincHSym.AsSymbols = AsSymbolAll
+	testBincHNoSym.AsSymbols = AsSymbolNone
+}
+
+func testInitAll() {
+	flag.Parse()
+	for _, f := range testPreInitFns {
+		f()
+	}
+	for _, f := range testPostInitFns {
+		f()
+	}
+}
+
+func logT(x interface{}, format string, args ...interface{}) {
+	if t, ok := x.(*testing.T); ok && t != nil && testLogToT {
+		if testVerbose {
+			t.Logf(format, args...)
+		}
+	} else if b, ok := x.(*testing.B); ok && b != nil && testLogToT {
+		b.Logf(format, args...)
+	} else {
+		if len(format) == 0 || format[len(format)-1] != '\n' {
+			format = format + "\n"
+		}
+		fmt.Printf(format, args...)
+	}
+}
+
+func approxDataSize(rv reflect.Value) (sum int) {
+	switch rk := rv.Kind(); rk {
+	case reflect.Invalid:
+	case reflect.Ptr, reflect.Interface:
+		sum += int(rv.Type().Size())
+		sum += approxDataSize(rv.Elem())
+	case reflect.Slice:
+		sum += int(rv.Type().Size())
+		for j := 0; j < rv.Len(); j++ {
+			sum += approxDataSize(rv.Index(j))
+		}
+	case reflect.String:
+		sum += int(rv.Type().Size())
+		sum += rv.Len()
+	case reflect.Map:
+		sum += int(rv.Type().Size())
+		for _, mk := range rv.MapKeys() {
+			sum += approxDataSize(mk)
+			sum += approxDataSize(rv.MapIndex(mk))
+		}
+	case reflect.Struct:
+		//struct size already includes the full data size.
+		//sum += int(rv.Type().Size())
+		for j := 0; j < rv.NumField(); j++ {
+			sum += approxDataSize(rv.Field(j))
+		}
+	default:
+		//pure value types
+		sum += int(rv.Type().Size())
+	}
+	return
+}
+
+// ----- functions below are used only by tests (not benchmarks)
+
+func checkErrT(t *testing.T, err error) {
+	if err != nil {
+		logT(t, err.Error())
+		failT(t)
+	}
+}
+
+func checkEqualT(t *testing.T, v1 interface{}, v2 interface{}, desc string) (err error) {
+	if err = deepEqual(v1, v2); err != nil {
+		logT(t, "Not Equal: %s: %v. v1: %v, v2: %v", desc, err, v1, v2)
+		failT(t)
+	}
+	return
+}
+
+func failT(t *testing.T) {
+	if failNowOnFail {
+		t.FailNow()
+	} else {
+		t.Fail()
+	}
+}
+
+func deepEqual(v1, v2 interface{}) (err error) {
+	if !reflect.DeepEqual(v1, v2) {
+		err = errors.New("Not Match")
+	}
+	return
+}

+ 39 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go

@@ -0,0 +1,39 @@
+//+build unsafe
+
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+import (
+	"unsafe"
+)
+
+// This file has unsafe variants of some helper methods.
+
+type unsafeString struct {
+	Data uintptr
+	Len  int
+}
+
+type unsafeBytes struct {
+	Data uintptr
+	Len  int
+	Cap  int
+}
+
+// stringView returns a view of the []byte as a string.
+// In unsafe mode, it doesn't incur allocation and copying caused by conversion.
+// In regular safe mode, it is an allocation and copy.
+func stringView(v []byte) string {
+	x := unsafeString{uintptr(unsafe.Pointer(&v[0])), len(v)}
+	return *(*string)(unsafe.Pointer(&x))
+}
+
+// bytesView returns a view of the string as a []byte.
+// In unsafe mode, it doesn't incur allocation and copying caused by conversion.
+// In regular safe mode, it is an allocation and copy.
+func bytesView(v string) []byte {
+	x := unsafeBytes{uintptr(unsafe.Pointer(&v)), len(v), len(v)}
+	return *(*[]byte)(unsafe.Pointer(&x))
+}

+ 924 - 0
libnetwork/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go

@@ -0,0 +1,924 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+
+// This json support uses base64 encoding for bytes, because you cannot
+// store and read any arbitrary string in json (only unicode).
+//
+// This library specifically supports UTF-8 for encoding and decoding only.
+//
+// Note that the library will happily encode/decode things which are not valid
+// json e.g. a map[int64]string. We do it for consistency. With valid json,
+// we will encode and decode appropriately.
+// Users can specify their map type if necessary to force it.
+//
+// Note:
+//   - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently.
+//     We implement it here.
+//   - Also, strconv.ParseXXX for floats and integers
+//     - only works on strings resulting in unnecessary allocation and []byte-string conversion.
+//     - it does a lot of redundant checks, because json numbers are simpler that what it supports.
+//   - We parse numbers (floats and integers) directly here.
+//     We only delegate parsing floats if it is a hairy float which could cause a loss of precision.
+//     In that case, we delegate to strconv.ParseFloat.
+//
+// Note:
+//   - encode does not beautify. There is no whitespace when encoding.
+//   - rpc calls which take single integer arguments or write single numeric arguments will need care.
+
+import (
+	"bytes"
+	"encoding/base64"
+	"fmt"
+	"strconv"
+	"unicode/utf16"
+	"unicode/utf8"
+)
+
+//--------------------------------
+
+var jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'}
+
+var jsonFloat64Pow10 = [...]float64{
+	1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
+	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
+	1e20, 1e21, 1e22,
+}
+
+var jsonUint64Pow10 = [...]uint64{
+	1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
+	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
+}
+
+const (
+	// if jsonTrackSkipWhitespace, we track Whitespace and reduce the number of redundant checks.
+	// Make it a const flag, so that it can be elided during linking if false.
+	//
+	// It is not a clear win, because we continually set a flag behind a pointer
+	// and then check it each time, as opposed to just 4 conditionals on a stack variable.
+	jsonTrackSkipWhitespace = true
+
+	// If !jsonValidateSymbols, decoding will be faster, by skipping some checks:
+	//   - If we see first character of null, false or true,
+	//     do not validate subsequent characters.
+	//   - e.g. if we see a n, assume null and skip next 3 characters,
+	//     and do not validate they are ull.
+	// P.S. Do not expect a significant decoding boost from this.
+	jsonValidateSymbols = true
+
+	// if jsonTruncateMantissa, truncate mantissa if trailing 0's.
+	// This is important because it could allow some floats to be decoded without
+	// deferring to strconv.ParseFloat.
+	jsonTruncateMantissa = true
+
+	// if mantissa >= jsonNumUintCutoff before multiplying by 10, this is an overflow
+	jsonNumUintCutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base)
+
+	// if mantissa >= jsonNumUintMaxVal, this is an overflow
+	jsonNumUintMaxVal = 1<<uint64(64) - 1
+
+	// jsonNumDigitsUint64Largest = 19
+)
+
+type jsonEncDriver struct {
+	e  *Encoder
+	w  encWriter
+	h  *JsonHandle
+	b  [64]byte // scratch
+	bs []byte   // scratch
+	noBuiltInTypes
+}
+
+func (e *jsonEncDriver) EncodeNil() {
+	e.w.writeb(jsonLiterals[9:13]) // null
+}
+
+func (e *jsonEncDriver) EncodeBool(b bool) {
+	if b {
+		e.w.writeb(jsonLiterals[0:4]) // true
+	} else {
+		e.w.writeb(jsonLiterals[4:9]) // false
+	}
+}
+
+func (e *jsonEncDriver) EncodeFloat32(f float32) {
+	e.w.writeb(strconv.AppendFloat(e.b[:0], float64(f), 'E', -1, 32))
+}
+
+func (e *jsonEncDriver) EncodeFloat64(f float64) {
+	// e.w.writestr(strconv.FormatFloat(f, 'E', -1, 64))
+	e.w.writeb(strconv.AppendFloat(e.b[:0], f, 'E', -1, 64))
+}
+
+func (e *jsonEncDriver) EncodeInt(v int64) {
+	e.w.writeb(strconv.AppendInt(e.b[:0], v, 10))
+}
+
+func (e *jsonEncDriver) EncodeUint(v uint64) {
+	e.w.writeb(strconv.AppendUint(e.b[:0], v, 10))
+}
+
+func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) {
+	if v := ext.ConvertExt(rv); v == nil {
+		e.EncodeNil()
+	} else {
+		en.encode(v)
+	}
+}
+
+func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) {
+	// only encodes re.Value (never re.Data)
+	if re.Value == nil {
+		e.EncodeNil()
+	} else {
+		en.encode(re.Value)
+	}
+}
+
+func (e *jsonEncDriver) EncodeArrayStart(length int) {
+	e.w.writen1('[')
+}
+
+func (e *jsonEncDriver) EncodeArrayEntrySeparator() {
+	e.w.writen1(',')
+}
+
+func (e *jsonEncDriver) EncodeArrayEnd() {
+	e.w.writen1(']')
+}
+
+func (e *jsonEncDriver) EncodeMapStart(length int) {
+	e.w.writen1('{')
+}
+
+func (e *jsonEncDriver) EncodeMapEntrySeparator() {
+	e.w.writen1(',')
+}
+
+func (e *jsonEncDriver) EncodeMapKVSeparator() {
+	e.w.writen1(':')
+}
+
+func (e *jsonEncDriver) EncodeMapEnd() {
+	e.w.writen1('}')
+}
+
+func (e *jsonEncDriver) EncodeString(c charEncoding, v string) {
+	// e.w.writestr(strconv.Quote(v))
+	e.quoteStr(v)
+}
+
+func (e *jsonEncDriver) EncodeSymbol(v string) {
+	// e.EncodeString(c_UTF8, v)
+	e.quoteStr(v)
+}
+
+func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) {
+	if c == c_RAW {
+		slen := base64.StdEncoding.EncodedLen(len(v))
+		if e.bs == nil {
+			e.bs = e.b[:]
+		}
+		if cap(e.bs) >= slen {
+			e.bs = e.bs[:slen]
+		} else {
+			e.bs = make([]byte, slen)
+		}
+		base64.StdEncoding.Encode(e.bs, v)
+		e.w.writen1('"')
+		e.w.writeb(e.bs)
+		e.w.writen1('"')
+	} else {
+		// e.EncodeString(c, string(v))
+		e.quoteStr(stringView(v))
+	}
+}
+
+func (e *jsonEncDriver) quoteStr(s string) {
+	// adapted from std pkg encoding/json
+	const hex = "0123456789abcdef"
+	w := e.w
+	w.writen1('"')
+	start := 0
+	for i := 0; i < len(s); {
+		if b := s[i]; b < utf8.RuneSelf {
+			if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
+				i++
+				continue
+			}
+			if start < i {
+				w.writestr(s[start:i])
+			}
+			switch b {
+			case '\\', '"':
+				w.writen2('\\', b)
+			case '\n':
+				w.writen2('\\', 'n')
+			case '\r':
+				w.writen2('\\', 'r')
+			case '\b':
+				w.writen2('\\', 'b')
+			case '\f':
+				w.writen2('\\', 'f')
+			case '\t':
+				w.writen2('\\', 't')
+			default:
+				// encode all bytes < 0x20 (except \r, \n).
+				// also encode < > & to prevent security holes when served to some browsers.
+				w.writestr(`\u00`)
+				w.writen2(hex[b>>4], hex[b&0xF])
+			}
+			i++
+			start = i
+			continue
+		}
+		c, size := utf8.DecodeRuneInString(s[i:])
+		if c == utf8.RuneError && size == 1 {
+			if start < i {
+				w.writestr(s[start:i])
+			}
+			w.writestr(`\ufffd`)
+			i += size
+			start = i
+			continue
+		}
+		// U+2028 is LINE SEPARATOR. U+2029 is PARAGRAPH SEPARATOR.
+		// Both technically valid JSON, but bomb on JSONP, so fix here.
+		if c == '\u2028' || c == '\u2029' {
+			if start < i {
+				w.writestr(s[start:i])
+			}
+			w.writestr(`\u202`)
+			w.writen1(hex[c&0xF])
+			i += size
+			start = i
+			continue
+		}
+		i += size
+	}
+	if start < len(s) {
+		w.writestr(s[start:])
+	}
+	w.writen1('"')
+}
+
+//--------------------------------
+
+type jsonNum struct {
+	bytes            []byte // may have [+-.eE0-9]
+	mantissa         uint64 // where mantissa ends, and maybe dot begins.
+	exponent         int16  // exponent value.
+	manOverflow      bool
+	neg              bool // started with -. No initial sign in the bytes above.
+	dot              bool // has dot
+	explicitExponent bool // explicit exponent
+}
+
+func (x *jsonNum) reset() {
+	x.bytes = x.bytes[:0]
+	x.manOverflow = false
+	x.neg = false
+	x.dot = false
+	x.explicitExponent = false
+	x.mantissa = 0
+	x.exponent = 0
+}
+
+// uintExp is called only if exponent > 0.
+func (x *jsonNum) uintExp() (n uint64, overflow bool) {
+	n = x.mantissa
+	e := x.exponent
+	if e >= int16(len(jsonUint64Pow10)) {
+		overflow = true
+		return
+	}
+	n *= jsonUint64Pow10[e]
+	if n < x.mantissa || n > jsonNumUintMaxVal {
+		overflow = true
+		return
+	}
+	return
+	// for i := int16(0); i < e; i++ {
+	// 	if n >= jsonNumUintCutoff {
+	// 		overflow = true
+	// 		return
+	// 	}
+	// 	n *= 10
+	// }
+	// return
+}
+
+func (x *jsonNum) floatVal() (f float64) {
+	// We do not want to lose precision.
+	// Consequently, we will delegate to strconv.ParseFloat if any of the following happen:
+	//    - There are more digits than in math.MaxUint64: 18446744073709551615 (20 digits)
+	//      We expect up to 99.... (19 digits)
+	//    - The mantissa cannot fit into a 52 bits of uint64
+	//    - The exponent is beyond our scope ie beyong 22.
+	const uint64MantissaBits = 52
+	const maxExponent = int16(len(jsonFloat64Pow10)) - 1
+
+	parseUsingStrConv := x.manOverflow ||
+		x.exponent > maxExponent ||
+		(x.exponent < 0 && -(x.exponent) > maxExponent) ||
+		x.mantissa>>uint64MantissaBits != 0
+	if parseUsingStrConv {
+		var err error
+		if f, err = strconv.ParseFloat(stringView(x.bytes), 64); err != nil {
+			panic(fmt.Errorf("parse float: %s, %v", x.bytes, err))
+			return
+		}
+		if x.neg {
+			f = -f
+		}
+		return
+	}
+
+	// all good. so handle parse here.
+	f = float64(x.mantissa)
+	// fmt.Printf(".Float: uint64 value: %v, float: %v\n", m, f)
+	if x.neg {
+		f = -f
+	}
+	if x.exponent > 0 {
+		f *= jsonFloat64Pow10[x.exponent]
+	} else if x.exponent < 0 {
+		f /= jsonFloat64Pow10[-x.exponent]
+	}
+	return
+}
+
+type jsonDecDriver struct {
+	d    *Decoder
+	h    *JsonHandle
+	r    decReader // *bytesDecReader decReader
+	ct   valueType // container type. one of unset, array or map.
+	bstr [8]byte   // scratch used for string \UXXX parsing
+	b    [64]byte  // scratch
+
+	wsSkipped bool // whitespace skipped
+
+	n jsonNum
+	noBuiltInTypes
+}
+
+// This will skip whitespace characters and return the next byte to read.
+// The next byte determines what the value will be one of.
+func (d *jsonDecDriver) skipWhitespace(unread bool) (b byte) {
+	// as initReadNext is not called all the time, we set ct to unSet whenever
+	// we skipwhitespace, as this is the signal that something new is about to be read.
+	d.ct = valueTypeUnset
+	b = d.r.readn1()
+	if !jsonTrackSkipWhitespace || !d.wsSkipped {
+		for ; b == ' ' || b == '\t' || b == '\r' || b == '\n'; b = d.r.readn1() {
+		}
+		if jsonTrackSkipWhitespace {
+			d.wsSkipped = true
+		}
+	}
+	if unread {
+		d.r.unreadn1()
+	}
+	return b
+}
+
+func (d *jsonDecDriver) CheckBreak() bool {
+	b := d.skipWhitespace(true)
+	return b == '}' || b == ']'
+}
+
+func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) {
+	bs := d.r.readx(int(toIdx - fromIdx))
+	if jsonValidateSymbols {
+		if !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) {
+			d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs)
+			return
+		}
+	}
+	if jsonTrackSkipWhitespace {
+		d.wsSkipped = false
+	}
+}
+
+func (d *jsonDecDriver) TryDecodeAsNil() bool {
+	b := d.skipWhitespace(true)
+	if b == 'n' {
+		d.readStrIdx(9, 13) // null
+		d.ct = valueTypeNil
+		return true
+	}
+	return false
+}
+
+func (d *jsonDecDriver) DecodeBool() bool {
+	b := d.skipWhitespace(false)
+	if b == 'f' {
+		d.readStrIdx(5, 9) // alse
+		return false
+	}
+	if b == 't' {
+		d.readStrIdx(1, 4) // rue
+		return true
+	}
+	d.d.errorf("json: decode bool: got first char %c", b)
+	return false // "unreachable"
+}
+
+func (d *jsonDecDriver) ReadMapStart() int {
+	d.expectChar('{')
+	d.ct = valueTypeMap
+	return -1
+}
+
+func (d *jsonDecDriver) ReadArrayStart() int {
+	d.expectChar('[')
+	d.ct = valueTypeArray
+	return -1
+}
+func (d *jsonDecDriver) ReadMapEnd() {
+	d.expectChar('}')
+}
+func (d *jsonDecDriver) ReadArrayEnd() {
+	d.expectChar(']')
+}
+func (d *jsonDecDriver) ReadArrayEntrySeparator() {
+	d.expectChar(',')
+}
+func (d *jsonDecDriver) ReadMapEntrySeparator() {
+	d.expectChar(',')
+}
+func (d *jsonDecDriver) ReadMapKVSeparator() {
+	d.expectChar(':')
+}
+func (d *jsonDecDriver) expectChar(c uint8) {
+	b := d.skipWhitespace(false)
+	if b != c {
+		d.d.errorf("json: expect char %c but got char %c", c, b)
+		return
+	}
+	if jsonTrackSkipWhitespace {
+		d.wsSkipped = false
+	}
+}
+
+func (d *jsonDecDriver) IsContainerType(vt valueType) bool {
+	// check container type by checking the first char
+	if d.ct == valueTypeUnset {
+		b := d.skipWhitespace(true)
+		if b == '{' {
+			d.ct = valueTypeMap
+		} else if b == '[' {
+			d.ct = valueTypeArray
+		} else if b == 'n' {
+			d.ct = valueTypeNil
+		} else if b == '"' {
+			d.ct = valueTypeString
+		}
+	}
+	if vt == valueTypeNil || vt == valueTypeBytes || vt == valueTypeString ||
+		vt == valueTypeArray || vt == valueTypeMap {
+		return d.ct == vt
+	}
+	// ugorji: made switch into conditionals, so that IsContainerType can be inlined.
+	// switch vt {
+	// case valueTypeNil, valueTypeBytes, valueTypeString, valueTypeArray, valueTypeMap:
+	// 	return d.ct == vt
+	// }
+	d.d.errorf("isContainerType: unsupported parameter: %v", vt)
+	return false // "unreachable"
+}
+
+func (d *jsonDecDriver) decNum(storeBytes bool) {
+	// storeBytes = true // TODO: remove.
+
+	// If it is has a . or an e|E, decode as a float; else decode as an int.
+	b := d.skipWhitespace(false)
+	if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) {
+		d.d.errorf("json: decNum: got first char '%c'", b)
+		return
+	}
+
+	const cutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base)
+	const jsonNumUintMaxVal = 1<<uint64(64) - 1
+
+	// var n jsonNum // create stack-copy jsonNum, and set to pointer at end.
+	// n.bytes = d.n.bytes[:0]
+	n := &d.n
+	n.reset()
+
+	// The format of a number is as below:
+	// parsing:     sign? digit* dot? digit* e?  sign? digit*
+	// states:  0   1*    2      3*   4      5*  6     7
+	// We honor this state so we can break correctly.
+	var state uint8 = 0
+	var eNeg bool
+	var e int16
+	var eof bool
+LOOP:
+	for !eof {
+		// fmt.Printf("LOOP: b: %q\n", b)
+		switch b {
+		case '+':
+			switch state {
+			case 0:
+				state = 2
+				// do not add sign to the slice ...
+				b, eof = d.r.readn1eof()
+				continue
+			case 6: // typ = jsonNumFloat
+				state = 7
+			default:
+				break LOOP
+			}
+		case '-':
+			switch state {
+			case 0:
+				state = 2
+				n.neg = true
+				// do not add sign to the slice ...
+				b, eof = d.r.readn1eof()
+				continue
+			case 6: // typ = jsonNumFloat
+				eNeg = true
+				state = 7
+			default:
+				break LOOP
+			}
+		case '.':
+			switch state {
+			case 0, 2: // typ = jsonNumFloat
+				state = 4
+				n.dot = true
+			default:
+				break LOOP
+			}
+		case 'e', 'E':
+			switch state {
+			case 0, 2, 4: // typ = jsonNumFloat
+				state = 6
+				// n.mantissaEndIndex = int16(len(n.bytes))
+				n.explicitExponent = true
+			default:
+				break LOOP
+			}
+		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+			switch state {
+			case 0:
+				state = 2
+				fallthrough
+			case 2:
+				fallthrough
+			case 4:
+				if n.dot {
+					n.exponent--
+				}
+				if n.mantissa >= jsonNumUintCutoff {
+					n.manOverflow = true
+					break
+				}
+				v := uint64(b - '0')
+				n.mantissa *= 10
+				if v != 0 {
+					n1 := n.mantissa + v
+					if n1 < n.mantissa || n1 > jsonNumUintMaxVal {
+						n.manOverflow = true // n+v overflows
+						break
+					}
+					n.mantissa = n1
+				}
+			case 6:
+				state = 7
+				fallthrough
+			case 7:
+				if !(b == '0' && e == 0) {
+					e = e*10 + int16(b-'0')
+				}
+			default:
+				break LOOP
+			}
+		default:
+			break LOOP
+		}
+		if storeBytes {
+			n.bytes = append(n.bytes, b)
+		}
+		b, eof = d.r.readn1eof()
+	}
+
+	if jsonTruncateMantissa && n.mantissa != 0 {
+		for n.mantissa%10 == 0 {
+			n.mantissa /= 10
+			n.exponent++
+		}
+	}
+
+	if e != 0 {
+		if eNeg {
+			n.exponent -= e
+		} else {
+			n.exponent += e
+		}
+	}
+
+	// d.n = n
+
+	if !eof {
+		d.r.unreadn1()
+	}
+	if jsonTrackSkipWhitespace {
+		d.wsSkipped = false
+	}
+	// fmt.Printf("1: n: bytes: %s, neg: %v, dot: %v, exponent: %v, mantissaEndIndex: %v\n",
+	// 	n.bytes, n.neg, n.dot, n.exponent, n.mantissaEndIndex)
+	return
+}
+
+func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) {
+	d.decNum(false)
+	n := &d.n
+	if n.manOverflow {
+		d.d.errorf("json: overflow integer after: %v", n.mantissa)
+		return
+	}
+	var u uint64
+	if n.exponent == 0 {
+		u = n.mantissa
+	} else if n.exponent < 0 {
+		d.d.errorf("json: fractional integer")
+		return
+	} else if n.exponent > 0 {
+		var overflow bool
+		if u, overflow = n.uintExp(); overflow {
+			d.d.errorf("json: overflow integer")
+			return
+		}
+	}
+	i = int64(u)
+	if n.neg {
+		i = -i
+	}
+	if chkOvf.Int(i, bitsize) {
+		d.d.errorf("json: overflow %v bits: %s", bitsize, n.bytes)
+		return
+	}
+	// fmt.Printf("DecodeInt: %v\n", i)
+	return
+}
+
+func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) {
+	d.decNum(false)
+	n := &d.n
+	if n.neg {
+		d.d.errorf("json: unsigned integer cannot be negative")
+		return
+	}
+	if n.manOverflow {
+		d.d.errorf("json: overflow integer after: %v", n.mantissa)
+		return
+	}
+	if n.exponent == 0 {
+		u = n.mantissa
+	} else if n.exponent < 0 {
+		d.d.errorf("json: fractional integer")
+		return
+	} else if n.exponent > 0 {
+		var overflow bool
+		if u, overflow = n.uintExp(); overflow {
+			d.d.errorf("json: overflow integer")
+			return
+		}
+	}
+	if chkOvf.Uint(u, bitsize) {
+		d.d.errorf("json: overflow %v bits: %s", bitsize, n.bytes)
+		return
+	}
+	// fmt.Printf("DecodeUint: %v\n", u)
+	return
+}
+
+func (d *jsonDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) {
+	d.decNum(true)
+	n := &d.n
+	f = n.floatVal()
+	if chkOverflow32 && chkOvf.Float32(f) {
+		d.d.errorf("json: overflow float32: %v, %s", f, n.bytes)
+		return
+	}
+	return
+}
+
+func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) {
+	if ext == nil {
+		re := rv.(*RawExt)
+		re.Tag = xtag
+		d.d.decode(&re.Value)
+	} else {
+		var v interface{}
+		d.d.decode(&v)
+		ext.UpdateExt(rv, v)
+	}
+	return
+}
+
+func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+	// zerocopy doesn't matter for json, as the bytes must be parsed.
+	bs0 := d.appendStringAsBytes(d.b[:0])
+	if isstring {
+		return bs0
+	}
+	slen := base64.StdEncoding.DecodedLen(len(bs0))
+	if cap(bs) >= slen {
+		bsOut = bs[:slen]
+	} else {
+		bsOut = make([]byte, slen)
+	}
+	slen2, err := base64.StdEncoding.Decode(bsOut, bs0)
+	if err != nil {
+		d.d.errorf("json: error decoding base64 binary '%s': %v", bs0, err)
+		return nil
+	}
+	if slen != slen2 {
+		bsOut = bsOut[:slen2]
+	}
+	return
+}
+
+func (d *jsonDecDriver) DecodeString() (s string) {
+	return string(d.appendStringAsBytes(d.b[:0]))
+}
+
+func (d *jsonDecDriver) appendStringAsBytes(v []byte) []byte {
+	d.expectChar('"')
+	for {
+		c := d.r.readn1()
+		if c == '"' {
+			break
+		} else if c == '\\' {
+			c = d.r.readn1()
+			switch c {
+			case '"', '\\', '/', '\'':
+				v = append(v, c)
+			case 'b':
+				v = append(v, '\b')
+			case 'f':
+				v = append(v, '\f')
+			case 'n':
+				v = append(v, '\n')
+			case 'r':
+				v = append(v, '\r')
+			case 't':
+				v = append(v, '\t')
+			case 'u':
+				rr := d.jsonU4(false)
+				// fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr))
+				if utf16.IsSurrogate(rr) {
+					rr = utf16.DecodeRune(rr, d.jsonU4(true))
+				}
+				w2 := utf8.EncodeRune(d.bstr[:], rr)
+				v = append(v, d.bstr[:w2]...)
+			default:
+				d.d.errorf("json: unsupported escaped value: %c", c)
+				return nil
+			}
+		} else {
+			v = append(v, c)
+		}
+	}
+	if jsonTrackSkipWhitespace {
+		d.wsSkipped = false
+	}
+	return v
+}
+
+func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune {
+	if checkSlashU && !(d.r.readn1() == '\\' && d.r.readn1() == 'u') {
+		d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`)
+		return 0
+	}
+	// u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64)
+	var u uint32
+	for i := 0; i < 4; i++ {
+		v := d.r.readn1()
+		if '0' <= v && v <= '9' {
+			v = v - '0'
+		} else if 'a' <= v && v <= 'z' {
+			v = v - 'a' + 10
+		} else if 'A' <= v && v <= 'Z' {
+			v = v - 'A' + 10
+		} else {
+			d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, v)
+			return 0
+		}
+		u = u*16 + uint32(v)
+	}
+	return rune(u)
+}
+
+func (d *jsonDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) {
+	n := d.skipWhitespace(true)
+	switch n {
+	case 'n':
+		d.readStrIdx(9, 13) // null
+		vt = valueTypeNil
+	case 'f':
+		d.readStrIdx(4, 9) // false
+		vt = valueTypeBool
+		v = false
+	case 't':
+		d.readStrIdx(0, 4) // true
+		vt = valueTypeBool
+		v = true
+	case '{':
+		vt = valueTypeMap
+		decodeFurther = true
+	case '[':
+		vt = valueTypeArray
+		decodeFurther = true
+	case '"':
+		vt = valueTypeString
+		v = d.DecodeString()
+	default: // number
+		d.decNum(true)
+		n := &d.n
+		// if the string had a any of [.eE], then decode as float.
+		switch {
+		case n.explicitExponent, n.dot, n.exponent < 0, n.manOverflow:
+			vt = valueTypeFloat
+			v = n.floatVal()
+		case n.exponent == 0:
+			u := n.mantissa
+			switch {
+			case n.neg:
+				vt = valueTypeInt
+				v = -int64(u)
+			case d.h.SignedInteger:
+				vt = valueTypeInt
+				v = int64(u)
+			default:
+				vt = valueTypeUint
+				v = u
+			}
+		default:
+			u, overflow := n.uintExp()
+			switch {
+			case overflow:
+				vt = valueTypeFloat
+				v = n.floatVal()
+			case n.neg:
+				vt = valueTypeInt
+				v = -int64(u)
+			case d.h.SignedInteger:
+				vt = valueTypeInt
+				v = int64(u)
+			default:
+				vt = valueTypeUint
+				v = u
+			}
+		}
+		// fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v)
+	}
+	return
+}
+
+//----------------------
+
+// JsonHandle is a handle for JSON encoding format.
+//
+// Json is comprehensively supported:
+//    - decodes numbers into interface{} as int, uint or float64
+//    - encodes and decodes []byte using base64 Std Encoding
+//    - UTF-8 support for encoding and decoding
+//
+// It has better performance than the json library in the standard library,
+// by leveraging the performance improvements of the codec library and
+// minimizing allocations.
+//
+// In addition, it doesn't read more bytes than necessary during a decode, which allows
+// reading multiple values from a stream containing json and non-json content.
+// For example, a user can read a json value, then a cbor value, then a msgpack value,
+// all from the same stream in sequence.
+type JsonHandle struct {
+	BasicHandle
+	textEncodingType
+}
+
+func (h *JsonHandle) newEncDriver(e *Encoder) encDriver {
+	return &jsonEncDriver{e: e, w: e.w, h: h}
+}
+
+func (h *JsonHandle) newDecDriver(d *Decoder) decDriver {
+	// d := jsonDecDriver{r: r.(*bytesDecReader), h: h}
+	hd := jsonDecDriver{d: d, r: d.r, h: h}
+	hd.n.bytes = d.b[:]
+	return &hd
+}
+
+var jsonEncodeTerminate = []byte{' '}
+
+func (h *JsonHandle) rpcEncodeTerminate() []byte {
+	return jsonEncodeTerminate
+}
+
+var _ decDriver = (*jsonDecDriver)(nil)
+var _ encDriver = (*jsonEncDriver)(nil)

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä