mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Move CloneContext and Traits from src/ast to src/
CloneContext clones the AST, types, symbols and in the future semantic info. 3/4 of these are non-ast, so promote these up to the root. Bug: tint:390 Change-Id: I49619796e6f81f9ab64f79413a12c87312cb1901 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38361 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f12054ea2a
commit
1e29f4beb0
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::AccessControl);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Alias);
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/ast/stride_decoration.h"
|
||||
#include "src/clone_context.h"
|
||||
#include "src/type/vector_type.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Array);
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/bool_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Bool);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::DepthTexture);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/f32_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::F32);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/i32_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::I32);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
#include "src/type/array_type.h"
|
||||
#include "src/type/vector_type.h"
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::MultisampledTexture);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/pointer_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Pointer);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::SampledTexture);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/sampler_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Sampler);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::StorageTexture);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
#include "src/type/alias_type.h"
|
||||
#include "src/type/array_type.h"
|
||||
#include "src/type/matrix_type.h"
|
||||
|
||||
@@ -21,15 +21,14 @@
|
||||
|
||||
namespace tint {
|
||||
|
||||
// Forward declarations
|
||||
class CloneContext;
|
||||
namespace ast {
|
||||
class Module;
|
||||
class CloneContext;
|
||||
} // namespace ast
|
||||
|
||||
namespace type {
|
||||
|
||||
using CloneContext = ast::CloneContext; // TEMP
|
||||
|
||||
/// Supported memory layouts for calculating sizes
|
||||
enum class MemoryLayout { kUniformBuffer, kStorageBuffer };
|
||||
|
||||
@@ -43,7 +42,7 @@ class Type : public Castable<Type> {
|
||||
/// Clones this type and all transitive types using the `CloneContext` `ctx`.
|
||||
/// @param ctx the clone context
|
||||
/// @return the newly cloned type
|
||||
virtual Type* Clone(ast::CloneContext* ctx) const = 0;
|
||||
virtual Type* Clone(CloneContext* ctx) const = 0;
|
||||
|
||||
/// @returns the name for this type. The type name is unique over all types.
|
||||
virtual std::string type_name() const = 0;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/u32_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::U32);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <assert.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Vector);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#include "src/type/void_type.h"
|
||||
|
||||
#include "src/ast/clone_context.h"
|
||||
#include "src/ast/module.h"
|
||||
#include "src/clone_context.h"
|
||||
|
||||
TINT_INSTANTIATE_CLASS_ID(tint::type::Void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user