tools: Add src/container

Contains generic Map and Set types.

Golang 1.18 added new support for generics, but has not yet added a standard library that provides generic containers. In future versions of Golang, there will almost certainly be similar implementations of these types.
Until then, use these to simplify some code.

100% test coverage.

Bug: dawn:1342
Change-Id: I2a5c7bfb26f15c2099037d3fa0f0576df641d9f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85220
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ben Clayton
2022-03-30 21:12:14 +00:00
committed by Dawn LUCI CQ
parent abe784b502
commit 475941c295
10 changed files with 505 additions and 1 deletions

5
.gitignore vendored
View File

@@ -27,7 +27,10 @@
/third_party/vulkan-deps
/third_party/vulkan_memory_allocator
/third_party/zlib
/tools
/tools/clang
/tools/cmake
/tools/golang
/tools/memory
/out
# Modified from https://www.gitignore.io/api/vim,macos,linux,emacs,windows,sublimetext,visualstudio,visualstudiocode