tint: Rework tint::Manager

Don't use dynamic casting in hashing and equality. These should be fast, and dynamic casting is expensive.

Add type::UniqueNode for things that need de-duplicating and bin the types on construction.

Replace some use of SFINAE with constexpr.

Also fixes a build failure for x86.

Bug: oss-fuzz:54184
Change-Id: Ic1b0708394f9f5703fc179a2c31ce18bd07e196c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2022-12-16 15:31:19 +00:00
committed by Dawn LUCI CQ
parent 1438e82354
commit 7c3e9a6dd2
56 changed files with 237 additions and 212 deletions

View File

@@ -62,7 +62,7 @@ class Any final : public Castable<Any, type::Type> {
// Stub implementations for type::Type conformance.
size_t Hash() const override { return 0; }
bool Equals(const type::Type&) const override { return false; }
bool Equals(const type::UniqueNode&) const override { return false; }
std::string FriendlyName(const SymbolTable&) const override { return "<any>"; }
};