Rename TypeDeterminer to Resolver
Move out of the src root and into its own subdirectory
Rename methods to remove the 'Determine' prefix.
Fixed: tint:529
Change-Id: Idf89d647780f8a2e7495c1c9e6c402e00ad45b7c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44041
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/docs/arch.md b/docs/arch.md
index 81385fa..39d14cb 100644
--- a/docs/arch.md
+++ b/docs/arch.md
@@ -24,7 +24,7 @@
┃ ┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
▲ ┆ Build ▼ ┆
┏━━━┻━━━┓ ┆ ┏━━━━━━━━┻━━━━━━━━┓ ┆
- ┃ Clone ┃ ┆ ┃ Type Determiner ┃ ┆
+ ┃ Clone ┃ ┆ ┃ Resolver ┃ ┆
┗━━━┳━━━┛ ┆ ┗━━━━━━━━━━━━━━━━━┛ ┆
▲ └┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
┃ ▼
@@ -69,8 +69,8 @@
the `Program` is constructed.
A `Program` is built from the `ProgramBuilder` by `std::move()`ing the
-`ProgramBuilder` to a new `Program` object. When built, type determination is
-run so the produced `Program` will contain all the needed semantic information.
+`ProgramBuilder` to a new `Program` object. When built, resolution is performed
+so the produced `Program` will contain all the needed semantic information.
At any time before building the `Program`, `ProgramBuilder::IsValid()` may be
called to ensure the AST is **structurally** correct. This checks that things
@@ -101,7 +101,7 @@
## Types
-Types are constructed during the Reader and Type Determination phases, and are
+Types are constructed during the Reader and resolution phases, and are
held by the `Program` or `ProgramBuilder`. AST and semantic nodes can both
reference types.
@@ -120,7 +120,7 @@
the resolved type of each expression, the resolved overload of an intrinsic
function call, and the module scoped variables used by each function.
-Semantic information is generated by the `TypeDeterminer` when the `Program`
+Semantic information is generated by the `Resolver` when the `Program`
is built from a `ProgramBuilder`.
The `semantic::Info` class holds a map of `ast::Node`s to `semantic::Node`s.
@@ -142,15 +142,15 @@
A `Namer` may output the symbol in any form that preserves the uniqueness of
that symbol.
-## Type Determiner
+## Resolver
-The `TypeDeterminer` will automatically run when a `Program` is built.
-A `TypeDeterminer` creates the `Program`s semantic information by analyzing the
+The `Resolver` will automatically run when a `Program` is built.
+A `Resolver` creates the `Program`s semantic information by analyzing the
`Program`s AST and type information.
-The `TypeDeterminer` will do the minimal amount of validation required in order
+The `Resolver` will do the minimal amount of validation required in order
to always be accessing valid nodes, reporting any errors found in the
-`Program`'s diagnostics. Even if the `TypeDeterminer` doesn't generate any
+`Program`'s diagnostics. Even if the `Resolver` doesn't generate any
errors doesn't mean the generated `Program` is semantically valid. Use the
`Validator` to check for a `Program`'s final validity.
@@ -158,10 +158,10 @@
A `Program` holds an immutable version of the information from the
`ProgramBuilder` along with semantic information generated by the
-`TypeDeterminer`.
+`Resolver`.
Like `ProgramBuilder`, `Program::IsValid()` may be called to ensure the AST is
-structurally correct and that the `TypeDeterminer` did not report any errors.
+structurally correct and that the `Resolver` did not report any errors.
`Program::IsValid()` does not perform semantic validation, use the `Validator`
to check for a `Program`'s final validity.
@@ -192,7 +192,7 @@
A transform operates by cloning the input `Program` into a new `ProgramBuilder`,
applying the required changes, and then finally building and returning a new
-output `Program`. As type determination is always run when a `Program` is built,
+output `Program`. As the resolver is always run when a `Program` is built,
Transforms will always emit a `Program` with semantic information.
The input `Program` to a transform must be valid (pass validation).