Commit Graph

7 Commits

Author SHA1 Message Date
dan sinclair 61d76ebb5c Update some forward declarations.
This CL removes some forward declarations which are no longer needed
and adds one missing declaration which was pulled in from other headers.

These were found by the clang-tidy bugprone-forward-declaration-namespace
check.

Bug: dawn:1414
Change-Id: I8906861e472f2d64a1547c8c6de348cd4151ffb5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91742
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-30 18:00:58 +00:00
dan sinclair 41e4d9a34c Consistent formatting for Dawn/Tint.
This CL updates the clang format files to have a single shared format
between Dawn and Tint. The major changes are tabs are 4 spaces, lines
are 100 columns and namespaces are not indented.

Bug: dawn:1339
Change-Id: I4208742c95643998d9fd14e77a9cc558071ded39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87603
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-01 14:40:55 +00:00
dan sinclair c990b3c867 Condense namespaces in tint/sem.
This PR condenses the namespaces in the tint/sem folder.

Change-Id: Iff802ca78d4cb7fd21134a640dfe5d04e85148b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86030
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-07 16:04:35 +00:00
Ben Clayton 41f8d2ad52 Use 'final' specifier on leaf classes
Tint makes heavy use of RTTI via virtual methods. Give the compiler the
opportunity to optimize away some of these virtuals.

Bug: tint:1383
Change-Id: I28edfaa0a05bb1a9c506c61c0084542c0aeb37f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82745
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-03-07 18:37:46 +00:00
Ben Clayton dc0e31cfaa sem: Remove Type::type_name.
Remove last remaining uses, and fix up a whole lot of tests.

Bug: tint:1383
Change-Id: Id2a11fc2d748b72823f4a077bcd6ba7be705a02b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82744
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-03-07 18:34:57 +00:00
Ben Clayton 4391975f72 sem: Use UniqueAllocator for types
Add a Hash() and Equals() methods to sem::Type.

Have sem::Manager (which should be called sem::TypeManager) derive from
utils::UniqueAllocator. This now uses the Hash() and Equals() for uniquely
constructing semantic types instead of building strings and comparing those.

Bug: tint:1383
Change-Id: I5e3229bd087391ac594d333a0ab4232cfcddf54d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82743
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-03-07 17:05:28 +00:00
Ryan Harrison dbc13af287 tint->dawn: Shuffle source tree in preperation of merging repos
docs/    -> docs/tint/
fuzzers/ -> src/tint/fuzzers/
samples/ -> src/tint/cmd/
src/     -> src/tint/
test/    -> test/tint/

BUG=tint:1418,tint:1433

Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2022-02-21 15:19:07 +00:00