From aea9c68de981bb8724c9ea68245b2c88b1ac267b Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Mon, 19 Apr 2021 22:54:43 +0000 Subject: [PATCH] Move type/* files to sem/ directory Bug: tint:724 Change-Id: I45d83d32dbce1fbee265810615c18219ef879b20 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48363 Commit-Queue: Antonio Maiorano Reviewed-by: Ben Clayton Kokoro: Kokoro --- include/tint/tint.h | 2 +- src/BUILD.gn | 84 ++++++------ src/CMakeLists.txt | 122 +++++++++--------- src/ast/expression.h | 2 +- src/ast/intrinsic_texture_helper_test.cc | 8 +- src/ast/intrinsic_texture_helper_test.h | 2 +- src/inspector/inspector.cc | 24 ++-- src/inspector/inspector_test.cc | 6 +- src/intrinsic_table.cc | 10 +- src/intrinsic_table_test.cc | 10 +- src/program.h | 2 +- src/program_builder.h | 24 ++-- src/reader/spirv/enum_converter.h | 2 +- src/reader/spirv/function.cc | 4 +- src/reader/spirv/parser_impl.cc | 8 +- src/reader/wgsl/parser_impl.cc | 8 +- src/reader/wgsl/parser_impl.h | 2 +- .../parser_impl_depth_texture_type_test.cc | 2 +- .../parser_impl_texture_sampler_types_test.cc | 6 +- src/reader/wgsl/parser_impl_type_decl_test.cc | 2 +- .../parser_impl_variable_ident_decl_test.cc | 2 +- src/resolver/assignment_validation_test.cc | 4 +- .../host_shareable_validation_test.cc | 2 +- src/resolver/intrinsic_test.cc | 4 +- src/resolver/is_host_shareable_test.cc | 2 +- src/resolver/is_storeable_test.cc | 2 +- src/resolver/resolver.cc | 2 +- src/resolver/resolver_test.cc | 4 +- src/resolver/storage_class_validation_test.cc | 2 +- src/resolver/validation_test.cc | 4 +- src/{type => sem}/access_control_type.cc | 2 +- src/{type => sem}/access_control_type.h | 8 +- src/{type => sem}/access_control_type_test.cc | 6 +- src/{type => sem}/alias_type.cc | 2 +- src/{type => sem}/alias_type.h | 8 +- src/{type => sem}/alias_type_test.cc | 6 +- src/{type => sem}/array_type.cc | 2 +- src/{type => sem}/array_type.h | 8 +- src/{type => sem}/array_type_test.cc | 6 +- src/{type => sem}/bool_type.cc | 2 +- src/{type => sem}/bool_type.h | 8 +- src/{type => sem}/bool_type_test.cc | 6 +- src/sem/call_target.h | 7 +- src/{type => sem}/depth_texture_type.cc | 2 +- src/{type => sem}/depth_texture_type.h | 8 +- src/{type => sem}/depth_texture_type_test.cc | 12 +- src/{type => sem}/external_texture_type.cc | 2 +- src/{type => sem}/external_texture_type.h | 8 +- .../external_texture_type_test.cc | 14 +- src/{type => sem}/f32_type.cc | 2 +- src/{type => sem}/f32_type.h | 8 +- src/{type => sem}/f32_type_test.cc | 6 +- src/sem/function.cc | 8 +- src/{type => sem}/i32_type.cc | 2 +- src/{type => sem}/i32_type.h | 8 +- src/{type => sem}/i32_type_test.cc | 6 +- src/{type => sem}/matrix_type.cc | 2 +- src/{type => sem}/matrix_type.h | 8 +- src/{type => sem}/matrix_type_test.cc | 6 +- .../multisampled_texture_type.cc | 2 +- src/{type => sem}/multisampled_texture_type.h | 8 +- .../multisampled_texture_type_test.cc | 14 +- src/{type => sem}/pointer_type.cc | 2 +- src/{type => sem}/pointer_type.h | 8 +- src/{type => sem}/pointer_type_test.cc | 6 +- src/{type => sem}/sampled_texture_type.cc | 2 +- src/{type => sem}/sampled_texture_type.h | 8 +- .../sampled_texture_type_test.cc | 12 +- src/{type => sem}/sampler_type.cc | 2 +- src/{type => sem}/sampler_type.h | 8 +- src/{type => sem}/sampler_type_test.cc | 6 +- src/{type => sem}/storage_texture_type.cc | 2 +- src/{type => sem}/storage_texture_type.h | 8 +- .../storage_texture_type_test.cc | 12 +- src/{type => sem}/struct_type.cc | 2 +- src/{type => sem}/struct_type.h | 8 +- src/{type => sem}/struct_type_test.cc | 6 +- src/{type => sem}/test_helper.h | 6 +- src/{type => sem}/texture_type.cc | 2 +- src/{type => sem}/texture_type.h | 8 +- src/{type => sem}/texture_type_test.cc | 4 +- src/{type => sem}/type.cc | 28 ++-- src/{type => sem}/type.h | 6 +- src/{type => sem}/type_manager.cc | 2 +- src/{type => sem}/type_manager.h | 8 +- src/{type => sem}/type_manager_test.cc | 6 +- src/{type => sem}/u32_type.cc | 2 +- src/{type => sem}/u32_type.h | 8 +- src/{type => sem}/u32_type_test.cc | 6 +- src/{type => sem}/vector_type.cc | 2 +- src/{type => sem}/vector_type.h | 8 +- src/{type => sem}/vector_type_test.cc | 6 +- src/{type => sem}/void_type.cc | 2 +- src/{type => sem}/void_type.h | 8 +- src/transform/binding_remapper.cc | 2 +- src/transform/decompose_storage_access.cc | 2 +- src/writer/hlsl/generator_impl.cc | 10 +- .../hlsl/generator_impl_function_test.cc | 2 +- .../generator_impl_member_accessor_test.cc | 2 +- .../hlsl/generator_impl_sanitizer_test.cc | 2 +- src/writer/hlsl/generator_impl_type_test.cc | 10 +- src/writer/msl/generator_impl.cc | 30 ++--- src/writer/msl/generator_impl.h | 2 +- .../msl/generator_impl_function_test.cc | 2 +- src/writer/msl/generator_impl_type_test.cc | 10 +- src/writer/spirv/builder.cc | 6 +- src/writer/spirv/builder.h | 4 +- src/writer/spirv/builder_entry_point_test.cc | 4 +- src/writer/spirv/builder_intrinsic_test.cc | 2 +- src/writer/spirv/builder_type_test.cc | 6 +- src/writer/wgsl/generator_impl.cc | 28 ++-- src/writer/wgsl/generator_impl.h | 4 +- .../wgsl/generator_impl_function_test.cc | 2 +- .../wgsl/generator_impl_global_decl_test.cc | 4 +- src/writer/wgsl/generator_impl_type_test.cc | 8 +- test/BUILD.gn | 38 +++--- 116 files changed, 468 insertions(+), 471 deletions(-) rename src/{type => sem}/access_control_type.cc (98%) rename src/{type => sem}/access_control_type.h (93%) rename src/{type => sem}/access_control_type_test.cc (96%) rename src/{type => sem}/alias_type.cc (97%) rename src/{type => sem}/alias_type.h (93%) rename src/{type => sem}/alias_type_test.cc (97%) rename src/{type => sem}/array_type.cc (98%) rename src/{type => sem}/array_type.h (95%) rename src/{type => sem}/array_type_test.cc (96%) rename src/{type => sem}/bool_type.cc (97%) rename src/{type => sem}/bool_type.h (92%) rename src/{type => sem}/bool_type_test.cc (92%) rename src/{type => sem}/depth_texture_type.cc (97%) rename src/{type => sem}/depth_texture_type.h (90%) rename src/{type => sem}/depth_texture_type_test.cc (88%) rename src/{type => sem}/external_texture_type.cc (96%) rename src/{type => sem}/external_texture_type.h (89%) rename src/{type => sem}/external_texture_type_test.cc (86%) rename src/{type => sem}/f32_type.cc (97%) rename src/{type => sem}/f32_type.h (92%) rename src/{type => sem}/f32_type_test.cc (92%) rename src/{type => sem}/i32_type.cc (97%) rename src/{type => sem}/i32_type.h (92%) rename src/{type => sem}/i32_type_test.cc (92%) rename src/{type => sem}/matrix_type.cc (97%) rename src/{type => sem}/matrix_type.h (93%) rename src/{type => sem}/matrix_type_test.cc (93%) rename src/{type => sem}/multisampled_texture_type.cc (97%) rename src/{type => sem}/multisampled_texture_type.h (90%) rename src/{type => sem}/multisampled_texture_type_test.cc (88%) rename src/{type => sem}/pointer_type.cc (97%) rename src/{type => sem}/pointer_type.h (93%) rename src/{type => sem}/pointer_type_test.cc (94%) rename src/{type => sem}/sampled_texture_type.cc (97%) rename src/{type => sem}/sampled_texture_type.h (91%) rename src/{type => sem}/sampled_texture_type_test.cc (89%) rename src/{type => sem}/sampler_type.cc (97%) rename src/{type => sem}/sampler_type.h (93%) rename src/{type => sem}/sampler_type_test.cc (95%) rename src/{type => sem}/storage_texture_type.cc (99%) rename src/{type => sem}/storage_texture_type.h (94%) rename src/{type => sem}/storage_texture_type_test.cc (95%) rename src/{type => sem}/struct_type.cc (97%) rename src/{type => sem}/struct_type.h (94%) rename src/{type => sem}/struct_type_test.cc (94%) rename src/{type => sem}/test_helper.h (93%) rename src/{type => sem}/texture_type.cc (98%) rename src/{type => sem}/texture_type.h (93%) rename src/{type => sem}/texture_type_test.cc (96%) rename src/{type => sem}/type.cc (86%) rename src/{type => sem}/type.h (98%) rename src/{type => sem}/type_manager.cc (95%) rename src/{type => sem}/type_manager.h (95%) rename src/{type => sem}/type_manager_test.cc (94%) rename src/{type => sem}/u32_type.cc (97%) rename src/{type => sem}/u32_type.h (92%) rename src/{type => sem}/u32_type_test.cc (92%) rename src/{type => sem}/vector_type.cc (97%) rename src/{type => sem}/vector_type.h (93%) rename src/{type => sem}/vector_type_test.cc (93%) rename src/{type => sem}/void_type.cc (97%) rename src/{type => sem}/void_type.h (91%) diff --git a/include/tint/tint.h b/include/tint/tint.h index d8c52336c3..fa40734d1e 100644 --- a/include/tint/tint.h +++ b/include/tint/tint.h @@ -23,6 +23,7 @@ #include "src/diagnostic/printer.h" #include "src/inspector/inspector.h" #include "src/reader/reader.h" +#include "src/sem/type_manager.h" #include "src/transform/binding_remapper.h" #include "src/transform/bound_array_accessors.h" #include "src/transform/emit_vertex_point_size.h" @@ -30,7 +31,6 @@ #include "src/transform/manager.h" #include "src/transform/renamer.h" #include "src/transform/vertex_pulling.h" -#include "src/type/type_manager.h" #include "src/writer/writer.h" #if TINT_BUILD_SPV_READER diff --git a/src/BUILD.gn b/src/BUILD.gn index 8a54ecc2c4..191428091f 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -430,6 +430,48 @@ libtint_source_set("libtint_core_all_src") { "resolver/resolver.cc", "resolver/resolver.h", "scope_stack.h", + "sem/access_control_type.cc", + "sem/access_control_type.h", + "sem/alias_type.cc", + "sem/alias_type.h", + "sem/array_type.cc", + "sem/array_type.h", + "sem/bool_type.cc", + "sem/bool_type.h", + "sem/depth_texture_type.cc", + "sem/depth_texture_type.h", + "sem/external_texture_type.cc", + "sem/external_texture_type.h", + "sem/f32_type.cc", + "sem/f32_type.h", + "sem/i32_type.cc", + "sem/i32_type.h", + "sem/matrix_type.cc", + "sem/matrix_type.h", + "sem/multisampled_texture_type.cc", + "sem/multisampled_texture_type.h", + "sem/pointer_type.cc", + "sem/pointer_type.h", + "sem/sampled_texture_type.cc", + "sem/sampled_texture_type.h", + "sem/sampler_type.cc", + "sem/sampler_type.h", + "sem/storage_texture_type.cc", + "sem/storage_texture_type.h", + "sem/struct_type.cc", + "sem/struct_type.h", + "sem/texture_type.cc", + "sem/texture_type.h", + "sem/type.cc", + "sem/type.h", + "sem/type_manager.cc", + "sem/type_manager.h", + "sem/u32_type.cc", + "sem/u32_type.h", + "sem/vector_type.cc", + "sem/vector_type.h", + "sem/void_type.cc", + "sem/void_type.h", "source.cc", "source.h", "symbol.cc", @@ -460,48 +502,6 @@ libtint_source_set("libtint_core_all_src") { "transform/transform.h", "transform/vertex_pulling.cc", "transform/vertex_pulling.h", - "type/access_control_type.cc", - "type/access_control_type.h", - "type/alias_type.cc", - "type/alias_type.h", - "type/array_type.cc", - "type/array_type.h", - "type/bool_type.cc", - "type/bool_type.h", - "type/depth_texture_type.cc", - "type/depth_texture_type.h", - "type/external_texture_type.cc", - "type/external_texture_type.h", - "type/f32_type.cc", - "type/f32_type.h", - "type/i32_type.cc", - "type/i32_type.h", - "type/matrix_type.cc", - "type/matrix_type.h", - "type/multisampled_texture_type.cc", - "type/multisampled_texture_type.h", - "type/pointer_type.cc", - "type/pointer_type.h", - "type/sampled_texture_type.cc", - "type/sampled_texture_type.h", - "type/sampler_type.cc", - "type/sampler_type.h", - "type/storage_texture_type.cc", - "type/storage_texture_type.h", - "type/struct_type.cc", - "type/struct_type.h", - "type/texture_type.cc", - "type/texture_type.h", - "type/type.cc", - "type/type.h", - "type/type_manager.cc", - "type/type_manager.h", - "type/u32_type.cc", - "type/u32_type.h", - "type/vector_type.cc", - "type/vector_type.h", - "type/void_type.cc", - "type/void_type.h", "utils/get_or_create.h", "utils/hash.h", "utils/math.h", diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c5b27faed..cac6fbeb1d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -238,48 +238,48 @@ set(TINT_LIB_SRCS transform/transform.h transform/vertex_pulling.cc transform/vertex_pulling.h - type/access_control_type.cc - type/access_control_type.h - type/alias_type.cc - type/alias_type.h - type/array_type.cc - type/array_type.h - type/bool_type.cc - type/bool_type.h - type/depth_texture_type.cc - type/depth_texture_type.h - type/external_texture_type.cc - type/external_texture_type.h - type/f32_type.cc - type/f32_type.h - type/i32_type.cc - type/i32_type.h - type/matrix_type.cc - type/matrix_type.h - type/multisampled_texture_type.cc - type/multisampled_texture_type.h - type/pointer_type.cc - type/pointer_type.h - type/sampled_texture_type.cc - type/sampled_texture_type.h - type/sampler_type.cc - type/sampler_type.h - type/storage_texture_type.cc - type/storage_texture_type.h - type/struct_type.cc - type/struct_type.h - type/texture_type.cc - type/texture_type.h - type/type.cc - type/type.h - type/type_manager.cc - type/type_manager.h - type/u32_type.cc - type/u32_type.h - type/vector_type.cc - type/vector_type.h - type/void_type.cc - type/void_type.h + sem/access_control_type.cc + sem/access_control_type.h + sem/alias_type.cc + sem/alias_type.h + sem/array_type.cc + sem/array_type.h + sem/bool_type.cc + sem/bool_type.h + sem/depth_texture_type.cc + sem/depth_texture_type.h + sem/external_texture_type.cc + sem/external_texture_type.h + sem/f32_type.cc + sem/f32_type.h + sem/i32_type.cc + sem/i32_type.h + sem/matrix_type.cc + sem/matrix_type.h + sem/multisampled_texture_type.cc + sem/multisampled_texture_type.h + sem/pointer_type.cc + sem/pointer_type.h + sem/sampled_texture_type.cc + sem/sampled_texture_type.h + sem/sampler_type.cc + sem/sampler_type.h + sem/storage_texture_type.cc + sem/storage_texture_type.h + sem/struct_type.cc + sem/struct_type.h + sem/texture_type.cc + sem/texture_type.h + sem/type.cc + sem/type.h + sem/type_manager.cc + sem/type_manager.h + sem/u32_type.cc + sem/u32_type.h + sem/vector_type.cc + sem/vector_type.h + sem/void_type.cc + sem/void_type.h utils/get_or_create.h utils/hash.h utils/math.h @@ -503,25 +503,25 @@ if(${TINT_BUILD_TESTS}) symbol_test.cc traits_test.cc test_main.cc - type/access_control_type_test.cc - type/alias_type_test.cc - type/array_type_test.cc - type/bool_type_test.cc - type/depth_texture_type_test.cc - type/external_texture_type_test.cc - type/f32_type_test.cc - type/i32_type_test.cc - type/matrix_type_test.cc - type/multisampled_texture_type_test.cc - type/pointer_type_test.cc - type/sampled_texture_type_test.cc - type/sampler_type_test.cc - type/storage_texture_type_test.cc - type/struct_type_test.cc - type/texture_type_test.cc - type/type_manager_test.cc - type/u32_type_test.cc - type/vector_type_test.cc + sem/access_control_type_test.cc + sem/alias_type_test.cc + sem/array_type_test.cc + sem/bool_type_test.cc + sem/depth_texture_type_test.cc + sem/external_texture_type_test.cc + sem/f32_type_test.cc + sem/i32_type_test.cc + sem/matrix_type_test.cc + sem/multisampled_texture_type_test.cc + sem/pointer_type_test.cc + sem/sampled_texture_type_test.cc + sem/sampler_type_test.cc + sem/storage_texture_type_test.cc + sem/struct_type_test.cc + sem/texture_type_test.cc + sem/type_manager_test.cc + sem/u32_type_test.cc + sem/vector_type_test.cc utils/command_${TINT_OS_CC_SUFFIX}.cc utils/command_test.cc utils/command.h diff --git a/src/ast/expression.h b/src/ast/expression.h index bfa766f14d..0db419fc26 100644 --- a/src/ast/expression.h +++ b/src/ast/expression.h @@ -19,7 +19,7 @@ #include #include "src/ast/node.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace ast { diff --git a/src/ast/intrinsic_texture_helper_test.cc b/src/ast/intrinsic_texture_helper_test.cc index f9be5ba4f6..e044cd6354 100644 --- a/src/ast/intrinsic_texture_helper_test.cc +++ b/src/ast/intrinsic_texture_helper_test.cc @@ -14,10 +14,10 @@ #include "src/ast/intrinsic_texture_helper_test.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" namespace tint { namespace ast { diff --git a/src/ast/intrinsic_texture_helper_test.h b/src/ast/intrinsic_texture_helper_test.h index 4ff154e717..e5c5628e6f 100644 --- a/src/ast/intrinsic_texture_helper_test.h +++ b/src/ast/intrinsic_texture_helper_test.h @@ -19,7 +19,7 @@ #include "src/ast/access_control.h" #include "src/program_builder.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace ast { diff --git a/src/inspector/inspector.cc b/src/inspector/inspector.cc index 34983cd1e7..6889416404 100644 --- a/src/inspector/inspector.cc +++ b/src/inspector/inspector.cc @@ -23,21 +23,21 @@ #include "src/ast/scalar_constructor_expression.h" #include "src/ast/sint_literal.h" #include "src/ast/uint_literal.h" +#include "src/sem/access_control_type.h" +#include "src/sem/array_type.h" +#include "src/sem/f32_type.h" #include "src/sem/function.h" +#include "src/sem/i32_type.h" +#include "src/sem/matrix_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/sem/struct.h" +#include "src/sem/struct_type.h" +#include "src/sem/u32_type.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/array_type.h" -#include "src/type/f32_type.h" -#include "src/type/i32_type.h" -#include "src/type/matrix_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" -#include "src/type/struct_type.h" -#include "src/type/u32_type.h" -#include "src/type/vector_type.h" -#include "src/type/void_type.h" +#include "src/sem/vector_type.h" +#include "src/sem/void_type.h" namespace tint { namespace inspector { diff --git a/src/inspector/inspector_test.cc b/src/inspector/inspector_test.cc index 54c5838058..f02f1f3718 100644 --- a/src/inspector/inspector_test.cc +++ b/src/inspector/inspector_test.cc @@ -18,9 +18,9 @@ #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" #include "src/ast/workgroup_decoration.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" #include "tint/tint.h" namespace tint { diff --git a/src/intrinsic_table.cc b/src/intrinsic_table.cc index 004bcbe558..db7dc549d5 100644 --- a/src/intrinsic_table.cc +++ b/src/intrinsic_table.cc @@ -20,11 +20,11 @@ #include #include "src/program_builder.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace { diff --git a/src/intrinsic_table_test.cc b/src/intrinsic_table_test.cc index 0b62d46b97..1fc730e8ff 100644 --- a/src/intrinsic_table_test.cc +++ b/src/intrinsic_table_test.cc @@ -16,11 +16,11 @@ #include "gmock/gmock.h" #include "src/program_builder.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace { diff --git a/src/program.h b/src/program.h index 9f666f144d..3cdc081acf 100644 --- a/src/program.h +++ b/src/program.h @@ -20,8 +20,8 @@ #include "src/ast/function.h" #include "src/program_id.h" #include "src/sem/info.h" +#include "src/sem/type_manager.h" #include "src/symbol_table.h" -#include "src/type/type_manager.h" namespace tint { diff --git a/src/program_builder.h b/src/program_builder.h index b66e904584..e5dbe148c2 100644 --- a/src/program_builder.h +++ b/src/program_builder.h @@ -43,18 +43,18 @@ #include "src/ast/variable_decl_statement.h" #include "src/program.h" #include "src/program_id.h" -#include "src/type/access_control_type.h" -#include "src/type/alias_type.h" -#include "src/type/array_type.h" -#include "src/type/bool_type.h" -#include "src/type/f32_type.h" -#include "src/type/i32_type.h" -#include "src/type/matrix_type.h" -#include "src/type/pointer_type.h" -#include "src/type/struct_type.h" -#include "src/type/u32_type.h" -#include "src/type/vector_type.h" -#include "src/type/void_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/alias_type.h" +#include "src/sem/array_type.h" +#include "src/sem/bool_type.h" +#include "src/sem/f32_type.h" +#include "src/sem/i32_type.h" +#include "src/sem/matrix_type.h" +#include "src/sem/pointer_type.h" +#include "src/sem/struct_type.h" +#include "src/sem/u32_type.h" +#include "src/sem/vector_type.h" +#include "src/sem/void_type.h" namespace tint { diff --git a/src/reader/spirv/enum_converter.h b/src/reader/spirv/enum_converter.h index 1fd535e88a..12ac904811 100644 --- a/src/reader/spirv/enum_converter.h +++ b/src/reader/spirv/enum_converter.h @@ -20,7 +20,7 @@ #include "src/ast/pipeline_stage.h" #include "src/ast/storage_class.h" #include "src/reader/spirv/fail_stream.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc index d66cd4e02b..7e6608f93a 100644 --- a/src/reader/spirv/function.cc +++ b/src/reader/spirv/function.cc @@ -31,8 +31,8 @@ #include "src/ast/switch_statement.h" #include "src/ast/unary_op_expression.h" #include "src/ast/variable_decl_statement.h" -#include "src/type/depth_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/sampled_texture_type.h" // Terms: // CFG: the control flow graph of the function, where basic blocks are the diff --git a/src/reader/spirv/parser_impl.cc b/src/reader/spirv/parser_impl.cc index f031a0e317..87315cadaf 100644 --- a/src/reader/spirv/parser_impl.cc +++ b/src/reader/spirv/parser_impl.cc @@ -22,10 +22,10 @@ #include "src/ast/constant_id_decoration.h" #include "src/ast/struct_block_decoration.h" #include "src/reader/spirv/function.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl.cc b/src/reader/wgsl/parser_impl.cc index 24cdda8996..d230a958f0 100644 --- a/src/reader/wgsl/parser_impl.cc +++ b/src/reader/wgsl/parser_impl.cc @@ -24,10 +24,10 @@ #include "src/ast/unary_op_expression.h" #include "src/ast/workgroup_decoration.h" #include "src/reader/wgsl/lexer.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl.h b/src/reader/wgsl/parser_impl.h index 7c7a7e3b87..b15fd1660c 100644 --- a/src/reader/wgsl/parser_impl.h +++ b/src/reader/wgsl/parser_impl.h @@ -35,7 +35,7 @@ #include "src/program_builder.h" #include "src/reader/wgsl/parser_impl_detail.h" #include "src/reader/wgsl/token.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl_depth_texture_type_test.cc b/src/reader/wgsl/parser_impl_depth_texture_type_test.cc index b4ddc85892..a9300b4d94 100644 --- a/src/reader/wgsl/parser_impl_depth_texture_type_test.cc +++ b/src/reader/wgsl/parser_impl_depth_texture_type_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "src/reader/wgsl/parser_impl_test_helper.h" -#include "src/type/depth_texture_type.h" +#include "src/sem/depth_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl_texture_sampler_types_test.cc b/src/reader/wgsl/parser_impl_texture_sampler_types_test.cc index a4378b95c0..125dcce550 100644 --- a/src/reader/wgsl/parser_impl_texture_sampler_types_test.cc +++ b/src/reader/wgsl/parser_impl_texture_sampler_types_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "src/reader/wgsl/parser_impl_test_helper.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl_type_decl_test.cc b/src/reader/wgsl/parser_impl_type_decl_test.cc index ba1b589116..4357774f54 100644 --- a/src/reader/wgsl/parser_impl_type_decl_test.cc +++ b/src/reader/wgsl/parser_impl_type_decl_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "src/reader/wgsl/parser_impl_test_helper.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" namespace tint { namespace reader { diff --git a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc index 4efdac3eb9..327088104b 100644 --- a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc +++ b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc @@ -14,7 +14,7 @@ #include "src/ast/struct_block_decoration.h" #include "src/reader/wgsl/parser_impl_test_helper.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" namespace tint { namespace reader { diff --git a/src/resolver/assignment_validation_test.cc b/src/resolver/assignment_validation_test.cc index 875e379b71..2dbbd67437 100644 --- a/src/resolver/assignment_validation_test.cc +++ b/src/resolver/assignment_validation_test.cc @@ -16,8 +16,8 @@ #include "gmock/gmock.h" #include "src/resolver/resolver_test_helper.h" -#include "src/type/access_control_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace resolver { diff --git a/src/resolver/host_shareable_validation_test.cc b/src/resolver/host_shareable_validation_test.cc index 85b67cd17c..0f6fa06e32 100644 --- a/src/resolver/host_shareable_validation_test.cc +++ b/src/resolver/host_shareable_validation_test.cc @@ -17,8 +17,8 @@ #include "gmock/gmock.h" #include "src/ast/struct_block_decoration.h" #include "src/resolver/resolver_test_helper.h" +#include "src/sem/access_control_type.h" #include "src/sem/struct.h" -#include "src/type/access_control_type.h" namespace tint { namespace resolver { diff --git a/src/resolver/intrinsic_test.cc b/src/resolver/intrinsic_test.cc index 5d96e6b00e..be4d80db49 100644 --- a/src/resolver/intrinsic_test.cc +++ b/src/resolver/intrinsic_test.cc @@ -30,13 +30,13 @@ #include "src/ast/unary_op_expression.h" #include "src/ast/variable_decl_statement.h" #include "src/resolver/resolver_test_helper.h" +#include "src/sem/access_control_type.h" #include "src/sem/call.h" #include "src/sem/function.h" #include "src/sem/member_accessor_expression.h" +#include "src/sem/sampled_texture_type.h" #include "src/sem/statement.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/sampled_texture_type.h" using ::testing::ElementsAre; using ::testing::HasSubstr; diff --git a/src/resolver/is_host_shareable_test.cc b/src/resolver/is_host_shareable_test.cc index 707e1daff2..1d5d53d71a 100644 --- a/src/resolver/is_host_shareable_test.cc +++ b/src/resolver/is_host_shareable_test.cc @@ -16,7 +16,7 @@ #include "gmock/gmock.h" #include "src/resolver/resolver_test_helper.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" namespace tint { namespace resolver { diff --git a/src/resolver/is_storeable_test.cc b/src/resolver/is_storeable_test.cc index f0d15c1b37..4e357dc9cf 100644 --- a/src/resolver/is_storeable_test.cc +++ b/src/resolver/is_storeable_test.cc @@ -16,7 +16,7 @@ #include "gmock/gmock.h" #include "src/resolver/resolver_test_helper.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" namespace tint { namespace resolver { diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index 56ce2a7f91..424c73e7c2 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -35,6 +35,7 @@ #include "src/ast/unary_op_expression.h" #include "src/ast/variable_decl_statement.h" #include "src/ast/workgroup_decoration.h" +#include "src/sem/access_control_type.h" #include "src/sem/array.h" #include "src/sem/call.h" #include "src/sem/function.h" @@ -42,7 +43,6 @@ #include "src/sem/statement.h" #include "src/sem/struct.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" #include "src/utils/get_or_create.h" #include "src/utils/math.h" diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc index 47f8654739..6ea8536fa5 100644 --- a/src/resolver/resolver_test.cc +++ b/src/resolver/resolver_test.cc @@ -33,13 +33,13 @@ #include "src/ast/unary_op_expression.h" #include "src/ast/variable_decl_statement.h" #include "src/resolver/resolver_test_helper.h" +#include "src/sem/access_control_type.h" #include "src/sem/call.h" #include "src/sem/function.h" #include "src/sem/member_accessor_expression.h" +#include "src/sem/sampled_texture_type.h" #include "src/sem/statement.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/sampled_texture_type.h" using ::testing::ElementsAre; using ::testing::HasSubstr; diff --git a/src/resolver/storage_class_validation_test.cc b/src/resolver/storage_class_validation_test.cc index 5dfdd1897e..931b23ab16 100644 --- a/src/resolver/storage_class_validation_test.cc +++ b/src/resolver/storage_class_validation_test.cc @@ -17,8 +17,8 @@ #include "gmock/gmock.h" #include "src/ast/struct_block_decoration.h" #include "src/resolver/resolver_test_helper.h" +#include "src/sem/access_control_type.h" #include "src/sem/struct.h" -#include "src/type/access_control_type.h" namespace tint { namespace resolver { diff --git a/src/resolver/validation_test.cc b/src/resolver/validation_test.cc index 4c26d0bcdd..b67eea477c 100644 --- a/src/resolver/validation_test.cc +++ b/src/resolver/validation_test.cc @@ -29,13 +29,13 @@ #include "src/ast/unary_op_expression.h" #include "src/ast/variable_decl_statement.h" #include "src/resolver/resolver_test_helper.h" +#include "src/sem/access_control_type.h" #include "src/sem/call.h" #include "src/sem/function.h" #include "src/sem/member_accessor_expression.h" +#include "src/sem/sampled_texture_type.h" #include "src/sem/statement.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/sampled_texture_type.h" using ::testing::ElementsAre; using ::testing::HasSubstr; diff --git a/src/type/access_control_type.cc b/src/sem/access_control_type.cc similarity index 98% rename from src/type/access_control_type.cc rename to src/sem/access_control_type.cc index 59f9f13bf0..09e9af2ad5 100644 --- a/src/type/access_control_type.cc +++ b/src/sem/access_control_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/program_builder.h" diff --git a/src/type/access_control_type.h b/src/sem/access_control_type.h similarity index 93% rename from src/type/access_control_type.h rename to src/sem/access_control_type.h index 55de5247e0..7f6ac3718a 100644 --- a/src/type/access_control_type.h +++ b/src/sem/access_control_type.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_ACCESS_CONTROL_TYPE_H_ -#define SRC_TYPE_ACCESS_CONTROL_TYPE_H_ +#ifndef SRC_SEM_ACCESS_CONTROL_TYPE_H_ +#define SRC_SEM_ACCESS_CONTROL_TYPE_H_ #include #include "src/ast/access_control.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -67,4 +67,4 @@ class AccessControl : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_ACCESS_CONTROL_TYPE_H_ +#endif // SRC_SEM_ACCESS_CONTROL_TYPE_H_ diff --git a/src/type/access_control_type_test.cc b/src/sem/access_control_type_test.cc similarity index 96% rename from src/type/access_control_type_test.cc rename to src/sem/access_control_type_test.cc index 2e88ca171a..cbc7cfd4c2 100644 --- a/src/type/access_control_type_test.cc +++ b/src/sem/access_control_type_test.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/alias_type.cc b/src/sem/alias_type.cc similarity index 97% rename from src/type/alias_type.cc rename to src/sem/alias_type.cc index 19ce92921e..6288ed8f93 100644 --- a/src/type/alias_type.cc +++ b/src/sem/alias_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/alias_type.h" +#include "src/sem/alias_type.h" #include "src/program_builder.h" diff --git a/src/type/alias_type.h b/src/sem/alias_type.h similarity index 93% rename from src/type/alias_type.h rename to src/sem/alias_type.h index ba8cd61547..f65ee2e252 100644 --- a/src/type/alias_type.h +++ b/src/sem/alias_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_ALIAS_TYPE_H_ -#define SRC_TYPE_ALIAS_TYPE_H_ +#ifndef SRC_SEM_ALIAS_TYPE_H_ +#define SRC_SEM_ALIAS_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -60,4 +60,4 @@ class Alias : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_ALIAS_TYPE_H_ +#endif // SRC_SEM_ALIAS_TYPE_H_ diff --git a/src/type/alias_type_test.cc b/src/sem/alias_type_test.cc similarity index 97% rename from src/type/alias_type_test.cc rename to src/sem/alias_type_test.cc index 24ba051f25..e113097ebc 100644 --- a/src/type/alias_type_test.cc +++ b/src/sem/alias_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/array_type.cc b/src/sem/array_type.cc similarity index 98% rename from src/type/array_type.cc rename to src/sem/array_type.cc index d2d866ca58..ebac7c2c9c 100644 --- a/src/type/array_type.cc +++ b/src/sem/array_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/array_type.h" +#include "src/sem/array_type.h" #include diff --git a/src/type/array_type.h b/src/sem/array_type.h similarity index 95% rename from src/type/array_type.h rename to src/sem/array_type.h index 0f833f1be3..6ddad88ebe 100644 --- a/src/type/array_type.h +++ b/src/sem/array_type.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_ARRAY_TYPE_H_ -#define SRC_TYPE_ARRAY_TYPE_H_ +#ifndef SRC_SEM_ARRAY_TYPE_H_ +#define SRC_SEM_ARRAY_TYPE_H_ #include #include "src/ast/decoration.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -72,4 +72,4 @@ class ArrayType : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_ARRAY_TYPE_H_ +#endif // SRC_SEM_ARRAY_TYPE_H_ diff --git a/src/type/array_type_test.cc b/src/sem/array_type_test.cc similarity index 96% rename from src/type/array_type_test.cc rename to src/sem/array_type_test.cc index b37cc4ca69..6d2124988b 100644 --- a/src/type/array_type_test.cc +++ b/src/sem/array_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/bool_type.cc b/src/sem/bool_type.cc similarity index 97% rename from src/type/bool_type.cc rename to src/sem/bool_type.cc index d17cf2c4a7..b828742631 100644 --- a/src/type/bool_type.cc +++ b/src/sem/bool_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/bool_type.h" +#include "src/sem/bool_type.h" #include "src/program_builder.h" diff --git a/src/type/bool_type.h b/src/sem/bool_type.h similarity index 92% rename from src/type/bool_type.h rename to src/sem/bool_type.h index 7402e47058..c42213e42d 100644 --- a/src/type/bool_type.h +++ b/src/sem/bool_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_BOOL_TYPE_H_ -#define SRC_TYPE_BOOL_TYPE_H_ +#ifndef SRC_SEM_BOOL_TYPE_H_ +#define SRC_SEM_BOOL_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" // X11 likes to #define Bool leading to confusing error messages. // If its defined, undefine it. @@ -54,4 +54,4 @@ class Bool : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_BOOL_TYPE_H_ +#endif // SRC_SEM_BOOL_TYPE_H_ diff --git a/src/type/bool_type_test.cc b/src/sem/bool_type_test.cc similarity index 92% rename from src/type/bool_type_test.cc rename to src/sem/bool_type_test.cc index 64094bf735..c11872da88 100644 --- a/src/type/bool_type_test.cc +++ b/src/sem/bool_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/sem/call_target.h b/src/sem/call_target.h index 8f4f013f90..3b3ed90b2b 100644 --- a/src/sem/call_target.h +++ b/src/sem/call_target.h @@ -18,16 +18,13 @@ #include #include "src/sem/node.h" -#include "src/type/sampler_type.h" +#include "src/sem/sampler_type.h" namespace tint { +namespace sem { // Forward declarations -namespace sem { class Type; -} // namespace sem - -namespace sem { /// Parameter describes a single parameter of a call target struct Parameter { diff --git a/src/type/depth_texture_type.cc b/src/sem/depth_texture_type.cc similarity index 97% rename from src/type/depth_texture_type.cc rename to src/sem/depth_texture_type.cc index 6ead318eb1..d4951e31ad 100644 --- a/src/type/depth_texture_type.cc +++ b/src/sem/depth_texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/depth_texture_type.h" +#include "src/sem/depth_texture_type.h" #include "src/program_builder.h" diff --git a/src/type/depth_texture_type.h b/src/sem/depth_texture_type.h similarity index 90% rename from src/type/depth_texture_type.h rename to src/sem/depth_texture_type.h index 2a2bbfd42f..e912a871cf 100644 --- a/src/type/depth_texture_type.h +++ b/src/sem/depth_texture_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_DEPTH_TEXTURE_TYPE_H_ -#define SRC_TYPE_DEPTH_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_DEPTH_TEXTURE_TYPE_H_ +#define SRC_SEM_DEPTH_TEXTURE_TYPE_H_ #include -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { @@ -49,4 +49,4 @@ class DepthTexture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_DEPTH_TEXTURE_TYPE_H_ +#endif // SRC_SEM_DEPTH_TEXTURE_TYPE_H_ diff --git a/src/type/depth_texture_type_test.cc b/src/sem/depth_texture_type_test.cc similarity index 88% rename from src/type/depth_texture_type_test.cc rename to src/sem/depth_texture_type_test.cc index 993879c380..0935eba88e 100644 --- a/src/type/depth_texture_type_test.cc +++ b/src/sem/depth_texture_type_test.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/depth_texture_type.h" +#include "src/sem/depth_texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/test_helper.h" -#include "src/type/access_control_type.h" -#include "src/type/external_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/external_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" namespace tint { namespace sem { diff --git a/src/type/external_texture_type.cc b/src/sem/external_texture_type.cc similarity index 96% rename from src/type/external_texture_type.cc rename to src/sem/external_texture_type.cc index 3dba14063a..7341aafb9d 100644 --- a/src/type/external_texture_type.cc +++ b/src/sem/external_texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/external_texture_type.h" +#include "src/sem/external_texture_type.h" #include "src/program_builder.h" diff --git a/src/type/external_texture_type.h b/src/sem/external_texture_type.h similarity index 89% rename from src/type/external_texture_type.h rename to src/sem/external_texture_type.h index c2ceb46335..8179d9f20c 100644 --- a/src/type/external_texture_type.h +++ b/src/sem/external_texture_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_EXTERNAL_TEXTURE_TYPE_H_ -#define SRC_TYPE_EXTERNAL_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_EXTERNAL_TEXTURE_TYPE_H_ +#define SRC_SEM_EXTERNAL_TEXTURE_TYPE_H_ #include -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { @@ -46,4 +46,4 @@ class ExternalTexture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_EXTERNAL_TEXTURE_TYPE_H_ +#endif // SRC_SEM_EXTERNAL_TEXTURE_TYPE_H_ diff --git a/src/type/external_texture_type_test.cc b/src/sem/external_texture_type_test.cc similarity index 86% rename from src/type/external_texture_type_test.cc rename to src/sem/external_texture_type_test.cc index 2fb74853ec..c12dc33c69 100644 --- a/src/type/external_texture_type_test.cc +++ b/src/sem/external_texture_type_test.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/external_texture_type.h" +#include "src/sem/external_texture_type.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" +#include "src/sem/test_helper.h" namespace tint { namespace sem { diff --git a/src/type/f32_type.cc b/src/sem/f32_type.cc similarity index 97% rename from src/type/f32_type.cc rename to src/sem/f32_type.cc index 7398957f51..f2d2043606 100644 --- a/src/type/f32_type.cc +++ b/src/sem/f32_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/f32_type.h" +#include "src/sem/f32_type.h" #include "src/program_builder.h" diff --git a/src/type/f32_type.h b/src/sem/f32_type.h similarity index 92% rename from src/type/f32_type.h rename to src/sem/f32_type.h index 2391404c51..e26bba9319 100644 --- a/src/type/f32_type.h +++ b/src/sem/f32_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_F32_TYPE_H_ -#define SRC_TYPE_F32_TYPE_H_ +#ifndef SRC_SEM_F32_TYPE_H_ +#define SRC_SEM_F32_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -48,4 +48,4 @@ class F32 : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_F32_TYPE_H_ +#endif // SRC_SEM_F32_TYPE_H_ diff --git a/src/type/f32_type_test.cc b/src/sem/f32_type_test.cc similarity index 92% rename from src/type/f32_type_test.cc rename to src/sem/f32_type_test.cc index 421ca9ed62..402b95387f 100644 --- a/src/type/f32_type_test.cc +++ b/src/sem/f32_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/sem/function.cc b/src/sem/function.cc index 9d222587d8..d4b18097bf 100644 --- a/src/sem/function.cc +++ b/src/sem/function.cc @@ -15,11 +15,11 @@ #include "src/sem/function.h" #include "src/ast/function.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/sem/variable.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" TINT_INSTANTIATE_TYPEINFO(tint::sem::Function); diff --git a/src/type/i32_type.cc b/src/sem/i32_type.cc similarity index 97% rename from src/type/i32_type.cc rename to src/sem/i32_type.cc index 5297a343f1..495180cc25 100644 --- a/src/type/i32_type.cc +++ b/src/sem/i32_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/i32_type.h" +#include "src/sem/i32_type.h" #include "src/program_builder.h" diff --git a/src/type/i32_type.h b/src/sem/i32_type.h similarity index 92% rename from src/type/i32_type.h rename to src/sem/i32_type.h index 2722e87cca..5d96fcf17f 100644 --- a/src/type/i32_type.h +++ b/src/sem/i32_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_I32_TYPE_H_ -#define SRC_TYPE_I32_TYPE_H_ +#ifndef SRC_SEM_I32_TYPE_H_ +#define SRC_SEM_I32_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -48,4 +48,4 @@ class I32 : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_I32_TYPE_H_ +#endif // SRC_SEM_I32_TYPE_H_ diff --git a/src/type/i32_type_test.cc b/src/sem/i32_type_test.cc similarity index 92% rename from src/type/i32_type_test.cc rename to src/sem/i32_type_test.cc index bf3a1ecbd5..1b6e1d3a00 100644 --- a/src/type/i32_type_test.cc +++ b/src/sem/i32_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/matrix_type.cc b/src/sem/matrix_type.cc similarity index 97% rename from src/type/matrix_type.cc rename to src/sem/matrix_type.cc index 4daa6b83ec..07c173f807 100644 --- a/src/type/matrix_type.cc +++ b/src/sem/matrix_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/matrix_type.h" +#include "src/sem/matrix_type.h" #include "src/program_builder.h" diff --git a/src/type/matrix_type.h b/src/sem/matrix_type.h similarity index 93% rename from src/type/matrix_type.h rename to src/sem/matrix_type.h index 3eefdd1a7d..2dd6ed2576 100644 --- a/src/type/matrix_type.h +++ b/src/sem/matrix_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_MATRIX_TYPE_H_ -#define SRC_TYPE_MATRIX_TYPE_H_ +#ifndef SRC_SEM_MATRIX_TYPE_H_ +#define SRC_SEM_MATRIX_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -63,4 +63,4 @@ class Matrix : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_MATRIX_TYPE_H_ +#endif // SRC_SEM_MATRIX_TYPE_H_ diff --git a/src/type/matrix_type_test.cc b/src/sem/matrix_type_test.cc similarity index 93% rename from src/type/matrix_type_test.cc rename to src/sem/matrix_type_test.cc index 87b32733b1..f94faa3cd1 100644 --- a/src/type/matrix_type_test.cc +++ b/src/sem/matrix_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/multisampled_texture_type.cc b/src/sem/multisampled_texture_type.cc similarity index 97% rename from src/type/multisampled_texture_type.cc rename to src/sem/multisampled_texture_type.cc index e3d19900a9..88b09f112c 100644 --- a/src/type/multisampled_texture_type.cc +++ b/src/sem/multisampled_texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/multisampled_texture_type.h" +#include "src/sem/multisampled_texture_type.h" #include "src/program_builder.h" diff --git a/src/type/multisampled_texture_type.h b/src/sem/multisampled_texture_type.h similarity index 90% rename from src/type/multisampled_texture_type.h rename to src/sem/multisampled_texture_type.h index 7542402eca..4a4c848160 100644 --- a/src/type/multisampled_texture_type.h +++ b/src/sem/multisampled_texture_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_MULTISAMPLED_TEXTURE_TYPE_H_ -#define SRC_TYPE_MULTISAMPLED_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_MULTISAMPLED_TEXTURE_TYPE_H_ +#define SRC_SEM_MULTISAMPLED_TEXTURE_TYPE_H_ #include -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { @@ -56,4 +56,4 @@ class MultisampledTexture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_MULTISAMPLED_TEXTURE_TYPE_H_ +#endif // SRC_SEM_MULTISAMPLED_TEXTURE_TYPE_H_ diff --git a/src/type/multisampled_texture_type_test.cc b/src/sem/multisampled_texture_type_test.cc similarity index 88% rename from src/type/multisampled_texture_type_test.cc rename to src/sem/multisampled_texture_type_test.cc index 3add47c983..010c6356b2 100644 --- a/src/type/multisampled_texture_type_test.cc +++ b/src/sem/multisampled_texture_type_test.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/multisampled_texture_type.h" +#include "src/sem/multisampled_texture_type.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/external_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/external_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" +#include "src/sem/test_helper.h" namespace tint { namespace sem { diff --git a/src/type/pointer_type.cc b/src/sem/pointer_type.cc similarity index 97% rename from src/type/pointer_type.cc rename to src/sem/pointer_type.cc index c9b22304a3..8ca1703377 100644 --- a/src/type/pointer_type.cc +++ b/src/sem/pointer_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/pointer_type.h" +#include "src/sem/pointer_type.h" #include "src/program_builder.h" diff --git a/src/type/pointer_type.h b/src/sem/pointer_type.h similarity index 93% rename from src/type/pointer_type.h rename to src/sem/pointer_type.h index 3290009f80..1ce73f2159 100644 --- a/src/type/pointer_type.h +++ b/src/sem/pointer_type.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_POINTER_TYPE_H_ -#define SRC_TYPE_POINTER_TYPE_H_ +#ifndef SRC_SEM_POINTER_TYPE_H_ +#define SRC_SEM_POINTER_TYPE_H_ #include #include "src/ast/storage_class.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -60,4 +60,4 @@ class Pointer : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_POINTER_TYPE_H_ +#endif // SRC_SEM_POINTER_TYPE_H_ diff --git a/src/type/pointer_type_test.cc b/src/sem/pointer_type_test.cc similarity index 94% rename from src/type/pointer_type_test.cc rename to src/sem/pointer_type_test.cc index 79a0bf2778..71fc47fd54 100644 --- a/src/type/pointer_type_test.cc +++ b/src/sem/pointer_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/sampled_texture_type.cc b/src/sem/sampled_texture_type.cc similarity index 97% rename from src/type/sampled_texture_type.cc rename to src/sem/sampled_texture_type.cc index 703de485d8..e820e9b73f 100644 --- a/src/type/sampled_texture_type.cc +++ b/src/sem/sampled_texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/sampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/program_builder.h" diff --git a/src/type/sampled_texture_type.h b/src/sem/sampled_texture_type.h similarity index 91% rename from src/type/sampled_texture_type.h rename to src/sem/sampled_texture_type.h index bcd27058ec..8bc3ad560f 100644 --- a/src/type/sampled_texture_type.h +++ b/src/sem/sampled_texture_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_SAMPLED_TEXTURE_TYPE_H_ -#define SRC_TYPE_SAMPLED_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_SAMPLED_TEXTURE_TYPE_H_ +#define SRC_SEM_SAMPLED_TEXTURE_TYPE_H_ #include -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { @@ -56,4 +56,4 @@ class SampledTexture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_SAMPLED_TEXTURE_TYPE_H_ +#endif // SRC_SEM_SAMPLED_TEXTURE_TYPE_H_ diff --git a/src/type/sampled_texture_type_test.cc b/src/sem/sampled_texture_type_test.cc similarity index 89% rename from src/type/sampled_texture_type_test.cc rename to src/sem/sampled_texture_type_test.cc index 97d4eb679d..10830032eb 100644 --- a/src/type/sampled_texture_type_test.cc +++ b/src/sem/sampled_texture_type_test.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/sampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/external_texture_type.h" -#include "src/type/storage_texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/external_texture_type.h" +#include "src/sem/storage_texture_type.h" +#include "src/sem/test_helper.h" namespace tint { namespace sem { diff --git a/src/type/sampler_type.cc b/src/sem/sampler_type.cc similarity index 97% rename from src/type/sampler_type.cc rename to src/sem/sampler_type.cc index 4679297a29..3fdc3a7451 100644 --- a/src/type/sampler_type.cc +++ b/src/sem/sampler_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/sampler_type.h" +#include "src/sem/sampler_type.h" #include "src/program_builder.h" diff --git a/src/type/sampler_type.h b/src/sem/sampler_type.h similarity index 93% rename from src/type/sampler_type.h rename to src/sem/sampler_type.h index 23ef24c6bc..050528ea3d 100644 --- a/src/type/sampler_type.h +++ b/src/sem/sampler_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_SAMPLER_TYPE_H_ -#define SRC_TYPE_SAMPLER_TYPE_H_ +#ifndef SRC_SEM_SAMPLER_TYPE_H_ +#define SRC_SEM_SAMPLER_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -67,4 +67,4 @@ class Sampler : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_SAMPLER_TYPE_H_ +#endif // SRC_SEM_SAMPLER_TYPE_H_ diff --git a/src/type/sampler_type_test.cc b/src/sem/sampler_type_test.cc similarity index 95% rename from src/type/sampler_type_test.cc rename to src/sem/sampler_type_test.cc index c7ef3c9f41..4e6c38290b 100644 --- a/src/type/sampler_type_test.cc +++ b/src/sem/sampler_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/storage_texture_type.cc b/src/sem/storage_texture_type.cc similarity index 99% rename from src/type/storage_texture_type.cc rename to src/sem/storage_texture_type.cc index e693dbe6de..798792bd34 100644 --- a/src/type/storage_texture_type.cc +++ b/src/sem/storage_texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/storage_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/program_builder.h" diff --git a/src/type/storage_texture_type.h b/src/sem/storage_texture_type.h similarity index 94% rename from src/type/storage_texture_type.h rename to src/sem/storage_texture_type.h index 933133c12c..59269a846a 100644 --- a/src/type/storage_texture_type.h +++ b/src/sem/storage_texture_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_STORAGE_TEXTURE_TYPE_H_ -#define SRC_TYPE_STORAGE_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_STORAGE_TEXTURE_TYPE_H_ +#define SRC_SEM_STORAGE_TEXTURE_TYPE_H_ #include -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { @@ -110,4 +110,4 @@ class StorageTexture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_STORAGE_TEXTURE_TYPE_H_ +#endif // SRC_SEM_STORAGE_TEXTURE_TYPE_H_ diff --git a/src/type/storage_texture_type_test.cc b/src/sem/storage_texture_type_test.cc similarity index 95% rename from src/type/storage_texture_type_test.cc rename to src/sem/storage_texture_type_test.cc index eb18999128..2716dc217e 100644 --- a/src/type/storage_texture_type_test.cc +++ b/src/sem/storage_texture_type_test.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/storage_texture_type.h" +#include "src/sem/storage_texture_type.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/external_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/external_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/test_helper.h" namespace tint { namespace sem { diff --git a/src/type/struct_type.cc b/src/sem/struct_type.cc similarity index 97% rename from src/type/struct_type.cc rename to src/sem/struct_type.cc index 1fa1cf66d4..1079b16d28 100644 --- a/src/type/struct_type.cc +++ b/src/sem/struct_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/struct_type.h" +#include "src/sem/struct_type.h" #include diff --git a/src/type/struct_type.h b/src/sem/struct_type.h similarity index 94% rename from src/type/struct_type.h rename to src/sem/struct_type.h index 139c61f6a5..67857d5ba3 100644 --- a/src/type/struct_type.h +++ b/src/sem/struct_type.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_STRUCT_TYPE_H_ -#define SRC_TYPE_STRUCT_TYPE_H_ +#ifndef SRC_SEM_STRUCT_TYPE_H_ +#define SRC_SEM_STRUCT_TYPE_H_ #include #include "src/ast/struct.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -66,4 +66,4 @@ class StructType : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_STRUCT_TYPE_H_ +#endif // SRC_SEM_STRUCT_TYPE_H_ diff --git a/src/type/struct_type_test.cc b/src/sem/struct_type_test.cc similarity index 94% rename from src/type/struct_type_test.cc rename to src/sem/struct_type_test.cc index e81afd3945..a667cfa2be 100644 --- a/src/type/struct_type_test.cc +++ b/src/sem/struct_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/test_helper.h b/src/sem/test_helper.h similarity index 93% rename from src/type/test_helper.h rename to src/sem/test_helper.h index 4ee2802054..e57ba6ca69 100644 --- a/src/type/test_helper.h +++ b/src/sem/test_helper.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_TEST_HELPER_H_ -#define SRC_TYPE_TEST_HELPER_H_ +#ifndef SRC_SEM_TEST_HELPER_H_ +#define SRC_SEM_TEST_HELPER_H_ #include @@ -46,4 +46,4 @@ using TestParamHelper = TestHelperBase>; } // namespace sem } // namespace tint -#endif // SRC_TYPE_TEST_HELPER_H_ +#endif // SRC_SEM_TEST_HELPER_H_ diff --git a/src/type/texture_type.cc b/src/sem/texture_type.cc similarity index 98% rename from src/type/texture_type.cc rename to src/sem/texture_type.cc index df16729c39..479d5a8fc6 100644 --- a/src/type/texture_type.cc +++ b/src/sem/texture_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" TINT_INSTANTIATE_TYPEINFO(tint::sem::Texture); diff --git a/src/type/texture_type.h b/src/sem/texture_type.h similarity index 93% rename from src/type/texture_type.h rename to src/sem/texture_type.h index 9c83debbed..d9ab6e3b64 100644 --- a/src/type/texture_type.h +++ b/src/sem/texture_type.h @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_TEXTURE_TYPE_H_ -#define SRC_TYPE_TEXTURE_TYPE_H_ +#ifndef SRC_SEM_TEXTURE_TYPE_H_ +#define SRC_SEM_TEXTURE_TYPE_H_ -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -72,4 +72,4 @@ class Texture : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_TEXTURE_TYPE_H_ +#endif // SRC_SEM_TEXTURE_TYPE_H_ diff --git a/src/type/texture_type_test.cc b/src/sem/texture_type_test.cc similarity index 96% rename from src/type/texture_type_test.cc rename to src/sem/texture_type_test.cc index a1dec3baed..ee1e25e826 100644 --- a/src/type/texture_type_test.cc +++ b/src/sem/texture_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/texture_type.h" +#include "src/sem/texture_type.h" -#include "src/type/test_helper.h" +#include "src/sem/test_helper.h" namespace tint { namespace sem { diff --git a/src/type/type.cc b/src/sem/type.cc similarity index 86% rename from src/type/type.cc rename to src/sem/type.cc index eee7d543bf..537bec131f 100644 --- a/src/type/type.cc +++ b/src/sem/type.cc @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/type.h" +#include "src/sem/type.h" -#include "src/type/access_control_type.h" -#include "src/type/alias_type.h" -#include "src/type/bool_type.h" -#include "src/type/f32_type.h" -#include "src/type/i32_type.h" -#include "src/type/matrix_type.h" -#include "src/type/pointer_type.h" -#include "src/type/sampler_type.h" -#include "src/type/texture_type.h" -#include "src/type/u32_type.h" -#include "src/type/vector_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/alias_type.h" +#include "src/sem/bool_type.h" +#include "src/sem/f32_type.h" +#include "src/sem/i32_type.h" +#include "src/sem/matrix_type.h" +#include "src/sem/pointer_type.h" +#include "src/sem/sampler_type.h" +#include "src/sem/texture_type.h" +#include "src/sem/u32_type.h" +#include "src/sem/vector_type.h" TINT_INSTANTIATE_TYPEINFO(tint::sem::Type); @@ -56,9 +56,9 @@ Type* Type::UnwrapIfNeeded() { auto* where = this; while (true) { if (auto* alias = where->As()) { - where = alias->type(); + where = alias->type(); } else if (auto* access = where->As()) { - where = access->type(); + where = access->type(); } else { break; } diff --git a/src/type/type.h b/src/sem/type.h similarity index 98% rename from src/type/type.h rename to src/sem/type.h index 7c23d679bd..8a7137c9e6 100644 --- a/src/type/type.h +++ b/src/sem/type.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_TYPE_H_ -#define SRC_TYPE_TYPE_H_ +#ifndef SRC_SEM_TYPE_H_ +#define SRC_SEM_TYPE_H_ #include @@ -112,4 +112,4 @@ inline ProgramID ProgramIDOf(const Type*) { } // namespace sem } // namespace tint -#endif // SRC_TYPE_TYPE_H_ +#endif // SRC_SEM_TYPE_H_ diff --git a/src/type/type_manager.cc b/src/sem/type_manager.cc similarity index 95% rename from src/type/type_manager.cc rename to src/sem/type_manager.cc index 76e97f467f..eaae5912a6 100644 --- a/src/type/type_manager.cc +++ b/src/sem/type_manager.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/type_manager.h" +#include "src/sem/type_manager.h" namespace tint { namespace sem { diff --git a/src/type/type_manager.h b/src/sem/type_manager.h similarity index 95% rename from src/type/type_manager.h rename to src/sem/type_manager.h index b42c2871ad..59d1041abb 100644 --- a/src/type/type_manager.h +++ b/src/sem/type_manager.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_TYPE_MANAGER_H_ -#define SRC_TYPE_TYPE_MANAGER_H_ +#ifndef SRC_SEM_TYPE_MANAGER_H_ +#define SRC_SEM_TYPE_MANAGER_H_ #include #include #include #include "src/block_allocator.h" -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -97,4 +97,4 @@ class Manager { } // namespace sem } // namespace tint -#endif // SRC_TYPE_TYPE_MANAGER_H_ +#endif // SRC_SEM_TYPE_MANAGER_H_ diff --git a/src/type/type_manager_test.cc b/src/sem/type_manager_test.cc similarity index 94% rename from src/type/type_manager_test.cc rename to src/sem/type_manager_test.cc index 0dc83c93ed..dcd8f05742 100644 --- a/src/type/type_manager_test.cc +++ b/src/sem/type_manager_test.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/type_manager.h" +#include "src/sem/type_manager.h" #include "gtest/gtest.h" -#include "src/type/i32_type.h" -#include "src/type/u32_type.h" +#include "src/sem/i32_type.h" +#include "src/sem/u32_type.h" namespace tint { namespace sem { diff --git a/src/type/u32_type.cc b/src/sem/u32_type.cc similarity index 97% rename from src/type/u32_type.cc rename to src/sem/u32_type.cc index 7a8ac3adb7..d4e014520f 100644 --- a/src/type/u32_type.cc +++ b/src/sem/u32_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/u32_type.h" +#include "src/sem/u32_type.h" #include "src/program_builder.h" diff --git a/src/type/u32_type.h b/src/sem/u32_type.h similarity index 92% rename from src/type/u32_type.h rename to src/sem/u32_type.h index bfd81a0184..eb1937d3e0 100644 --- a/src/type/u32_type.h +++ b/src/sem/u32_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_U32_TYPE_H_ -#define SRC_TYPE_U32_TYPE_H_ +#ifndef SRC_SEM_U32_TYPE_H_ +#define SRC_SEM_U32_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -48,4 +48,4 @@ class U32 : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_U32_TYPE_H_ +#endif // SRC_SEM_U32_TYPE_H_ diff --git a/src/type/u32_type_test.cc b/src/sem/u32_type_test.cc similarity index 92% rename from src/type/u32_type_test.cc rename to src/sem/u32_type_test.cc index 39f657f61a..5e0bcc426b 100644 --- a/src/type/u32_type_test.cc +++ b/src/sem/u32_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/vector_type.cc b/src/sem/vector_type.cc similarity index 97% rename from src/type/vector_type.cc rename to src/sem/vector_type.cc index 5e12305970..591bcb14de 100644 --- a/src/type/vector_type.cc +++ b/src/sem/vector_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/vector_type.h" +#include "src/sem/vector_type.h" #include "src/program_builder.h" diff --git a/src/type/vector_type.h b/src/sem/vector_type.h similarity index 93% rename from src/type/vector_type.h rename to src/sem/vector_type.h index 34ed90872e..4df716a8de 100644 --- a/src/type/vector_type.h +++ b/src/sem/vector_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_VECTOR_TYPE_H_ -#define SRC_TYPE_VECTOR_TYPE_H_ +#ifndef SRC_SEM_VECTOR_TYPE_H_ +#define SRC_SEM_VECTOR_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -59,4 +59,4 @@ class Vector : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_VECTOR_TYPE_H_ +#endif // SRC_SEM_VECTOR_TYPE_H_ diff --git a/src/type/vector_type_test.cc b/src/sem/vector_type_test.cc similarity index 93% rename from src/type/vector_type_test.cc rename to src/sem/vector_type_test.cc index 656721fb6d..099aae6f04 100644 --- a/src/type/vector_type_test.cc +++ b/src/sem/vector_type_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/access_control_type.h" -#include "src/type/test_helper.h" -#include "src/type/texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/test_helper.h" +#include "src/sem/texture_type.h" namespace tint { namespace sem { diff --git a/src/type/void_type.cc b/src/sem/void_type.cc similarity index 97% rename from src/type/void_type.cc rename to src/sem/void_type.cc index c0445b83f2..fbdd3b3568 100644 --- a/src/type/void_type.cc +++ b/src/sem/void_type.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/type/void_type.h" +#include "src/sem/void_type.h" #include "src/program_builder.h" diff --git a/src/type/void_type.h b/src/sem/void_type.h similarity index 91% rename from src/type/void_type.h rename to src/sem/void_type.h index 88fef42641..f32cb473b0 100644 --- a/src/type/void_type.h +++ b/src/sem/void_type.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TYPE_VOID_TYPE_H_ -#define SRC_TYPE_VOID_TYPE_H_ +#ifndef SRC_SEM_VOID_TYPE_H_ +#define SRC_SEM_VOID_TYPE_H_ #include -#include "src/type/type.h" +#include "src/sem/type.h" namespace tint { namespace sem { @@ -48,4 +48,4 @@ class Void : public Castable { } // namespace sem } // namespace tint -#endif // SRC_TYPE_VOID_TYPE_H_ +#endif // SRC_SEM_VOID_TYPE_H_ diff --git a/src/transform/binding_remapper.cc b/src/transform/binding_remapper.cc index aa6b7ad64b..2dc14a34d2 100644 --- a/src/transform/binding_remapper.cc +++ b/src/transform/binding_remapper.cc @@ -17,8 +17,8 @@ #include #include "src/program_builder.h" +#include "src/sem/access_control_type.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" TINT_INSTANTIATE_TYPEINFO(tint::transform::BindingRemapper::Remappings); diff --git a/src/transform/decompose_storage_access.cc b/src/transform/decompose_storage_access.cc index ea9c5bb5c6..63e8ebd28b 100644 --- a/src/transform/decompose_storage_access.cc +++ b/src/transform/decompose_storage_access.cc @@ -24,12 +24,12 @@ #include "src/ast/call_statement.h" #include "src/ast/scalar_constructor_expression.h" #include "src/program_builder.h" +#include "src/sem/access_control_type.h" #include "src/sem/array.h" #include "src/sem/call.h" #include "src/sem/member_accessor_expression.h" #include "src/sem/struct.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" #include "src/utils/get_or_create.h" #include "src/utils/hash.h" diff --git a/src/writer/hlsl/generator_impl.cc b/src/writer/hlsl/generator_impl.cc index 6efadf439f..52cc06ada0 100644 --- a/src/writer/hlsl/generator_impl.cc +++ b/src/writer/hlsl/generator_impl.cc @@ -22,19 +22,19 @@ #include "src/ast/fallthrough_statement.h" #include "src/ast/internal_decoration.h" #include "src/ast/variable_decl_statement.h" +#include "src/sem/access_control_type.h" #include "src/sem/array.h" #include "src/sem/call.h" +#include "src/sem/depth_texture_type.h" #include "src/sem/function.h" #include "src/sem/member_accessor_expression.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/sem/struct.h" #include "src/sem/variable.h" #include "src/transform/calculate_array_length.h" #include "src/transform/decompose_storage_access.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" #include "src/writer/append_vector.h" #include "src/writer/float_to_string.h" diff --git a/src/writer/hlsl/generator_impl_function_test.cc b/src/writer/hlsl/generator_impl_function_test.cc index 0f73a3092b..3e7daf6255 100644 --- a/src/writer/hlsl/generator_impl_function_test.cc +++ b/src/writer/hlsl/generator_impl_function_test.cc @@ -17,7 +17,7 @@ #include "src/ast/struct_block_decoration.h" #include "src/ast/variable_decl_statement.h" #include "src/ast/workgroup_decoration.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/writer/hlsl/test_helper.h" using ::testing::HasSubstr; diff --git a/src/writer/hlsl/generator_impl_member_accessor_test.cc b/src/writer/hlsl/generator_impl_member_accessor_test.cc index dec727599d..f25e691e2f 100644 --- a/src/writer/hlsl/generator_impl_member_accessor_test.cc +++ b/src/writer/hlsl/generator_impl_member_accessor_test.cc @@ -15,7 +15,7 @@ #include "gmock/gmock.h" #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/writer/hlsl/test_helper.h" namespace tint { diff --git a/src/writer/hlsl/generator_impl_sanitizer_test.cc b/src/writer/hlsl/generator_impl_sanitizer_test.cc index 70937135bc..c167aaf1c0 100644 --- a/src/writer/hlsl/generator_impl_sanitizer_test.cc +++ b/src/writer/hlsl/generator_impl_sanitizer_test.cc @@ -15,7 +15,7 @@ #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" #include "src/ast/variable_decl_statement.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/writer/hlsl/test_helper.h" namespace tint { diff --git a/src/writer/hlsl/generator_impl_type_test.cc b/src/writer/hlsl/generator_impl_type_test.cc index de367173b4..9e77e941e7 100644 --- a/src/writer/hlsl/generator_impl_type_test.cc +++ b/src/writer/hlsl/generator_impl_type_test.cc @@ -16,11 +16,11 @@ #include "src/ast/call_statement.h" #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/writer/hlsl/test_helper.h" namespace tint { diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc index 2fb8fc2744..018d45308a 100644 --- a/src/writer/msl/generator_impl.cc +++ b/src/writer/msl/generator_impl.cc @@ -28,27 +28,27 @@ #include "src/ast/sint_literal.h" #include "src/ast/uint_literal.h" #include "src/ast/variable_decl_statement.h" +#include "src/sem/access_control_type.h" +#include "src/sem/alias_type.h" #include "src/sem/array.h" +#include "src/sem/array_type.h" +#include "src/sem/bool_type.h" #include "src/sem/call.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/f32_type.h" #include "src/sem/function.h" +#include "src/sem/i32_type.h" +#include "src/sem/matrix_type.h" #include "src/sem/member_accessor_expression.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/pointer_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/sem/struct.h" +#include "src/sem/u32_type.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/alias_type.h" -#include "src/type/array_type.h" -#include "src/type/bool_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/f32_type.h" -#include "src/type/i32_type.h" -#include "src/type/matrix_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/pointer_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" -#include "src/type/u32_type.h" -#include "src/type/vector_type.h" -#include "src/type/void_type.h" +#include "src/sem/vector_type.h" +#include "src/sem/void_type.h" #include "src/writer/float_to_string.h" namespace tint { diff --git a/src/writer/msl/generator_impl.h b/src/writer/msl/generator_impl.h index fd1f9fba8d..ad74cb0d16 100644 --- a/src/writer/msl/generator_impl.h +++ b/src/writer/msl/generator_impl.h @@ -35,7 +35,7 @@ #include "src/ast/unary_op_expression.h" #include "src/program.h" #include "src/scope_stack.h" -#include "src/type/struct_type.h" +#include "src/sem/struct_type.h" #include "src/writer/text_generator.h" namespace tint { diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc index 34b0b315f8..473d3216e9 100644 --- a/src/writer/msl/generator_impl_function_test.cc +++ b/src/writer/msl/generator_impl_function_test.cc @@ -15,7 +15,7 @@ #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" #include "src/ast/variable_decl_statement.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/writer/msl/test_helper.h" namespace tint { diff --git a/src/writer/msl/generator_impl_type_test.cc b/src/writer/msl/generator_impl_type_test.cc index 0a00963b97..2c377629a2 100644 --- a/src/writer/msl/generator_impl_type_test.cc +++ b/src/writer/msl/generator_impl_type_test.cc @@ -15,11 +15,11 @@ #include #include "src/ast/struct_block_decoration.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" +#include "src/sem/storage_texture_type.h" #include "src/writer/msl/test_helper.h" namespace tint { diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc index fd80ef3df6..de53041086 100644 --- a/src/writer/spirv/builder.cc +++ b/src/writer/spirv/builder.cc @@ -23,13 +23,13 @@ #include "src/ast/fallthrough_statement.h" #include "src/sem/array.h" #include "src/sem/call.h" +#include "src/sem/depth_texture_type.h" #include "src/sem/function.h" #include "src/sem/intrinsic.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/sem/struct.h" #include "src/sem/variable.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" #include "src/writer/append_vector.h" namespace tint { diff --git a/src/writer/spirv/builder.h b/src/writer/spirv/builder.h index 878ab25018..5f44e0f5d6 100644 --- a/src/writer/spirv/builder.h +++ b/src/writer/spirv/builder.h @@ -34,8 +34,8 @@ #include "src/ast/variable_decl_statement.h" #include "src/program_builder.h" #include "src/scope_stack.h" -#include "src/type/access_control_type.h" -#include "src/type/storage_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/storage_texture_type.h" #include "src/writer/spirv/function.h" #include "src/writer/spirv/scalar_constant.h" diff --git a/src/writer/spirv/builder_entry_point_test.cc b/src/writer/spirv/builder_entry_point_test.cc index 3e02d1a7f6..555b93ca22 100644 --- a/src/writer/spirv/builder_entry_point_test.cc +++ b/src/writer/spirv/builder_entry_point_test.cc @@ -23,8 +23,8 @@ #include "src/ast/storage_class.h" #include "src/ast/variable.h" #include "src/program.h" -#include "src/type/f32_type.h" -#include "src/type/vector_type.h" +#include "src/sem/f32_type.h" +#include "src/sem/vector_type.h" #include "src/writer/spirv/builder.h" #include "src/writer/spirv/spv_dump.h" #include "src/writer/spirv/test_helper.h" diff --git a/src/writer/spirv/builder_intrinsic_test.cc b/src/writer/spirv/builder_intrinsic_test.cc index 3a0457d4fe..8e21765bcd 100644 --- a/src/writer/spirv/builder_intrinsic_test.cc +++ b/src/writer/spirv/builder_intrinsic_test.cc @@ -15,7 +15,7 @@ #include "src/ast/call_statement.h" #include "src/ast/stage_decoration.h" #include "src/ast/struct_block_decoration.h" -#include "src/type/depth_texture_type.h" +#include "src/sem/depth_texture_type.h" #include "src/writer/spirv/spv_dump.h" #include "src/writer/spirv/test_helper.h" diff --git a/src/writer/spirv/builder_type_test.cc b/src/writer/spirv/builder_type_test.cc index 812cbb5f9a..4fd9b325cd 100644 --- a/src/writer/spirv/builder_type_test.cc +++ b/src/writer/spirv/builder_type_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "src/ast/struct_block_decoration.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/writer/spirv/spv_dump.h" #include "src/writer/spirv/test_helper.h" diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc index 212a8aa46f..4f4dfaf966 100644 --- a/src/writer/wgsl/generator_impl.cc +++ b/src/writer/wgsl/generator_impl.cc @@ -32,23 +32,23 @@ #include "src/ast/uint_literal.h" #include "src/ast/variable_decl_statement.h" #include "src/ast/workgroup_decoration.h" +#include "src/sem/access_control_type.h" +#include "src/sem/alias_type.h" +#include "src/sem/array_type.h" +#include "src/sem/bool_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/f32_type.h" #include "src/sem/function.h" +#include "src/sem/i32_type.h" +#include "src/sem/matrix_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/pointer_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/sem/struct.h" +#include "src/sem/u32_type.h" #include "src/sem/variable.h" -#include "src/type/access_control_type.h" -#include "src/type/alias_type.h" -#include "src/type/array_type.h" -#include "src/type/bool_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/f32_type.h" -#include "src/type/i32_type.h" -#include "src/type/matrix_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/pointer_type.h" -#include "src/type/sampled_texture_type.h" -#include "src/type/u32_type.h" -#include "src/type/vector_type.h" -#include "src/type/void_type.h" +#include "src/sem/vector_type.h" +#include "src/sem/void_type.h" #include "src/utils/math.h" #include "src/writer/float_to_string.h" diff --git a/src/writer/wgsl/generator_impl.h b/src/writer/wgsl/generator_impl.h index 0c0bb51d6b..5ac967fe87 100644 --- a/src/writer/wgsl/generator_impl.h +++ b/src/writer/wgsl/generator_impl.h @@ -34,8 +34,8 @@ #include "src/ast/type_constructor_expression.h" #include "src/ast/unary_op_expression.h" #include "src/program.h" -#include "src/type/storage_texture_type.h" -#include "src/type/struct_type.h" +#include "src/sem/storage_texture_type.h" +#include "src/sem/struct_type.h" #include "src/writer/text_generator.h" namespace tint { diff --git a/src/writer/wgsl/generator_impl_function_test.cc b/src/writer/wgsl/generator_impl_function_test.cc index b5dfe450b1..617ec00020 100644 --- a/src/writer/wgsl/generator_impl_function_test.cc +++ b/src/writer/wgsl/generator_impl_function_test.cc @@ -16,7 +16,7 @@ #include "src/ast/struct_block_decoration.h" #include "src/ast/variable_decl_statement.h" #include "src/ast/workgroup_decoration.h" -#include "src/type/access_control_type.h" +#include "src/sem/access_control_type.h" #include "src/writer/wgsl/test_helper.h" namespace tint { diff --git a/src/writer/wgsl/generator_impl_global_decl_test.cc b/src/writer/wgsl/generator_impl_global_decl_test.cc index a2a0ab91e4..6dd6ca24a6 100644 --- a/src/writer/wgsl/generator_impl_global_decl_test.cc +++ b/src/writer/wgsl/generator_impl_global_decl_test.cc @@ -14,8 +14,8 @@ #include "src/ast/stage_decoration.h" #include "src/ast/variable_decl_statement.h" -#include "src/type/access_control_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/writer/wgsl/test_helper.h" namespace tint { diff --git a/src/writer/wgsl/generator_impl_type_test.cc b/src/writer/wgsl/generator_impl_type_test.cc index 71721aa4e5..167fef7e5a 100644 --- a/src/writer/wgsl/generator_impl_type_test.cc +++ b/src/writer/wgsl/generator_impl_type_test.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "src/ast/struct_block_decoration.h" -#include "src/type/access_control_type.h" -#include "src/type/depth_texture_type.h" -#include "src/type/multisampled_texture_type.h" -#include "src/type/sampled_texture_type.h" +#include "src/sem/access_control_type.h" +#include "src/sem/depth_texture_type.h" +#include "src/sem/multisampled_texture_type.h" +#include "src/sem/sampled_texture_type.h" #include "src/writer/wgsl/test_helper.h" namespace tint { diff --git a/test/BUILD.gn b/test/BUILD.gn index a64d410cb9..ba2a815a64 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -219,6 +219,25 @@ tint_unittests_source_set("tint_unittests_core_src") { "../src/resolver/type_validation_test.cc", "../src/resolver/validation_test.cc", "../src/scope_stack_test.cc", + "../src/sem/access_control_type_test.cc", + "../src/sem/alias_type_test.cc", + "../src/sem/array_type_test.cc", + "../src/sem/bool_type_test.cc", + "../src/sem/depth_texture_type_test.cc", + "../src/sem/external_texture_type_test.cc", + "../src/sem/f32_type_test.cc", + "../src/sem/i32_type_test.cc", + "../src/sem/matrix_type_test.cc", + "../src/sem/multisampled_texture_type_test.cc", + "../src/sem/pointer_type_test.cc", + "../src/sem/sampled_texture_type_test.cc", + "../src/sem/sampler_type_test.cc", + "../src/sem/storage_texture_type_test.cc", + "../src/sem/struct_type_test.cc", + "../src/sem/texture_type_test.cc", + "../src/sem/type_manager_test.cc", + "../src/sem/u32_type_test.cc", + "../src/sem/vector_type_test.cc", "../src/symbol_table_test.cc", "../src/symbol_test.cc", "../src/traits_test.cc", @@ -232,25 +251,6 @@ tint_unittests_source_set("tint_unittests_core_src") { "../src/transform/renamer_test.cc", "../src/transform/test_helper.h", "../src/transform/vertex_pulling_test.cc", - "../src/type/access_control_type_test.cc", - "../src/type/alias_type_test.cc", - "../src/type/array_type_test.cc", - "../src/type/bool_type_test.cc", - "../src/type/depth_texture_type_test.cc", - "../src/type/external_texture_type_test.cc", - "../src/type/f32_type_test.cc", - "../src/type/i32_type_test.cc", - "../src/type/matrix_type_test.cc", - "../src/type/multisampled_texture_type_test.cc", - "../src/type/pointer_type_test.cc", - "../src/type/sampled_texture_type_test.cc", - "../src/type/sampler_type_test.cc", - "../src/type/storage_texture_type_test.cc", - "../src/type/struct_type_test.cc", - "../src/type/texture_type_test.cc", - "../src/type/type_manager_test.cc", - "../src/type/u32_type_test.cc", - "../src/type/vector_type_test.cc", "../src/utils/command.h", "../src/utils/command_test.cc", "../src/utils/get_or_create_test.cc",