diff --git a/explorer/BUILD b/explorer/BUILD index 441e368af3516..0fbfe3af62fa4 100644 --- a/explorer/BUILD +++ b/explorer/BUILD @@ -24,7 +24,7 @@ cc_library( deps = [ "//common:error", "//common:ostream", - "//explorer/common:trace_stream", + "//explorer/base:trace_stream", "//explorer/parse_and_execute", "@llvm-project//llvm:Support", ], diff --git a/explorer/README.md b/explorer/README.md index ba8862b868742..9b9e8f34c950a 100644 --- a/explorer/README.md +++ b/explorer/README.md @@ -41,19 +41,19 @@ RTTI switches, so that the compiler can help ensure the code is updated when a new type is added. `explorer` never uses plain pointer types directly. Instead, we use the -[`Nonnull`](common/nonnull.h) alias for pointers that are not nullable, or +[`Nonnull`](base/nonnull.h) alias for pointers that are not nullable, or `std::optional>` for pointers that are nullable. Many of the most commonly-used objects in `explorer` have lifetimes that are tied to the lifespan of the entire Carbon program. We manage the lifetimes of -those objects by allocating them through an [`Arena`](common/arena.h) object, +those objects by allocating them through an [`Arena`](base/arena.h) object, which can allocate objects of arbitrary types, and retains ownership of them. As of this writing, all of `explorer` uses a single `Arena` object, we may introduce multiple `Arena`s for different lifetime groups in the future. For simplicity, `explorer` generally treats all errors as fatal. Errors caused by bugs in the user-provided Carbon code should be reported with the error -builders in [`error_builders.h`](common/error_builders.h). Errors caused by bugs +builders in [`error_builders.h`](base/error_builders.h). Errors caused by bugs in `explorer` itself should be reported with [`CHECK` or `FATAL`](../common/check.h). diff --git a/explorer/ast/BUILD b/explorer/ast/BUILD index 0ec9b6b860723..f192094f7c79e 100644 --- a/explorer/ast/BUILD +++ b/explorer/ast/BUILD @@ -51,11 +51,11 @@ cc_library( "//common:error", "//common:indirect_value", "//common:ostream", - "//explorer/common:arena", - "//explorer/common:decompose", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", + "//explorer/base:arena", + "//explorer/base:decompose", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", "@llvm-project//llvm:Support", ], ) @@ -81,7 +81,7 @@ cc_test( deps = [ ":ast", ":ast_test_matchers", - "//explorer/common:arena", + "//explorer/base:arena", "//testing/util:gtest_main", "@com_google_googletest//:gtest", ], @@ -93,7 +93,7 @@ cc_test( deps = [ ":ast", ":paren_contents", - "//explorer/common:arena", + "//explorer/base:arena", "//testing/util:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", @@ -109,8 +109,8 @@ cc_library( name = "paren_contents", hdrs = ["paren_contents.h"], deps = [ - "//explorer/common:error_builders", - "//explorer/common:source_location", + "//explorer/base:error_builders", + "//explorer/base:source_location", ], ) @@ -120,7 +120,7 @@ cc_test( deps = [ ":ast", ":paren_contents", - "//explorer/common:arena", + "//explorer/base:arena", "//testing/util:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", @@ -133,7 +133,7 @@ cc_test( deps = [ ":ast", ":paren_contents", - "//explorer/common:arena", + "//explorer/base:arena", "//testing/util:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", @@ -149,10 +149,10 @@ cc_library( "//common:check", "//common:error", "//common:ostream", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", - "//explorer/common:trace_stream", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) diff --git a/explorer/ast/ast.h b/explorer/ast/ast.h index 1b30d10edaba3..28061e39d3100 100644 --- a/explorer/ast/ast.h +++ b/explorer/ast/ast.h @@ -9,7 +9,7 @@ #include "explorer/ast/declaration.h" #include "explorer/ast/library_name.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" namespace Carbon { diff --git a/explorer/ast/ast_node.h b/explorer/ast/ast_node.h index 005df3d4fa48d..525c3e7f418b8 100644 --- a/explorer/ast/ast_node.h +++ b/explorer/ast/ast_node.h @@ -6,7 +6,7 @@ #define CARBON_EXPLORER_AST_AST_NODE_H_ #include "explorer/ast/ast_rtti.h" -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" #include "llvm/Support/Casting.h" namespace Carbon { diff --git a/explorer/ast/ast_test_matchers_test.cpp b/explorer/ast/ast_test_matchers_test.cpp index 64a1c8bf47425..731577294d92f 100644 --- a/explorer/ast/ast_test_matchers_test.cpp +++ b/explorer/ast/ast_test_matchers_test.cpp @@ -11,7 +11,7 @@ #include "explorer/ast/expression.h" #include "explorer/ast/pattern.h" #include "explorer/ast/statement.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" namespace Carbon::Testing { namespace { diff --git a/explorer/ast/bindings.h b/explorer/ast/bindings.h index afc210f561a71..e5b8ac963fc29 100644 --- a/explorer/ast/bindings.h +++ b/explorer/ast/bindings.h @@ -10,7 +10,7 @@ #include "common/ostream.h" #include "explorer/ast/clone_context.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringExtras.h" diff --git a/explorer/ast/clone_context.h b/explorer/ast/clone_context.h index a77158ce9ea5e..7be00a42d538d 100644 --- a/explorer/ast/clone_context.h +++ b/explorer/ast/clone_context.h @@ -11,7 +11,7 @@ #include "common/check.h" #include "explorer/ast/ast_rtti.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/Casting.h" diff --git a/explorer/ast/declaration.h b/explorer/ast/declaration.h index b3f11f506f502..26d6d32866e1a 100644 --- a/explorer/ast/declaration.h +++ b/explorer/ast/declaration.h @@ -20,8 +20,8 @@ #include "explorer/ast/return_term.h" #include "explorer/ast/statement.h" #include "explorer/ast/value_node.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Compiler.h" diff --git a/explorer/ast/element.h b/explorer/ast/element.h index 859582fa6d945..07b7d56db9492 100644 --- a/explorer/ast/element.h +++ b/explorer/ast/element.h @@ -11,8 +11,8 @@ #include "common/ostream.h" #include "explorer/ast/ast_rtti.h" -#include "explorer/common/decompose.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/decompose.h" +#include "explorer/base/nonnull.h" #include "llvm/ADT/PointerUnion.h" namespace Carbon { diff --git a/explorer/ast/element_test.cpp b/explorer/ast/element_test.cpp index da1c8663a1046..b759c498e1402 100644 --- a/explorer/ast/element_test.cpp +++ b/explorer/ast/element_test.cpp @@ -13,7 +13,7 @@ #include "explorer/ast/declaration.h" #include "explorer/ast/expression.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "llvm/Support/Casting.h" namespace Carbon::Testing { diff --git a/explorer/ast/expression.cpp b/explorer/ast/expression.cpp index e1263373770ff..0342bb483a675 100644 --- a/explorer/ast/expression.cpp +++ b/explorer/ast/expression.cpp @@ -9,8 +9,8 @@ #include "explorer/ast/pattern.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/arena.h" +#include "explorer/base/error_builders.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Casting.h" #include "llvm/Support/raw_ostream.h" diff --git a/explorer/ast/expression.h b/explorer/ast/expression.h index 34b6c52d85074..cb9206f11b792 100644 --- a/explorer/ast/expression.h +++ b/explorer/ast/expression.h @@ -19,8 +19,8 @@ #include "explorer/ast/expression_category.h" #include "explorer/ast/paren_contents.h" #include "explorer/ast/value_node.h" -#include "explorer/common/arena.h" -#include "explorer/common/source_location.h" +#include "explorer/base/arena.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Compiler.h" diff --git a/explorer/ast/expression_test.cpp b/explorer/ast/expression_test.cpp index d3e39786ff4ed..4acd0e55729b4 100644 --- a/explorer/ast/expression_test.cpp +++ b/explorer/ast/expression_test.cpp @@ -10,7 +10,7 @@ #include #include "explorer/ast/paren_contents.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "llvm/Support/Casting.h" namespace Carbon::Testing { diff --git a/explorer/ast/paren_contents.h b/explorer/ast/paren_contents.h index 526802fc49cfe..95382dc8d819f 100644 --- a/explorer/ast/paren_contents.h +++ b/explorer/ast/paren_contents.h @@ -9,8 +9,8 @@ #include #include -#include "explorer/common/error_builders.h" -#include "explorer/common/source_location.h" +#include "explorer/base/error_builders.h" +#include "explorer/base/source_location.h" namespace Carbon { diff --git a/explorer/ast/pattern.cpp b/explorer/ast/pattern.cpp index 8b36d3ee5af20..0699fd9baffe1 100644 --- a/explorer/ast/pattern.cpp +++ b/explorer/ast/pattern.cpp @@ -10,8 +10,8 @@ #include "explorer/ast/expression.h" #include "explorer/ast/impl_binding.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/arena.h" +#include "explorer/base/error_builders.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Casting.h" diff --git a/explorer/ast/pattern.h b/explorer/ast/pattern.h index fe2934b1b79af..e7d5d1bd2c13d 100644 --- a/explorer/ast/pattern.h +++ b/explorer/ast/pattern.h @@ -17,7 +17,7 @@ #include "explorer/ast/expression.h" #include "explorer/ast/expression_category.h" #include "explorer/ast/value_node.h" -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLFunctionalExtras.h" diff --git a/explorer/ast/pattern_test.cpp b/explorer/ast/pattern_test.cpp index f3c1c00005eb8..36de0d5aa30d6 100644 --- a/explorer/ast/pattern_test.cpp +++ b/explorer/ast/pattern_test.cpp @@ -9,7 +9,7 @@ #include "explorer/ast/expression.h" #include "explorer/ast/paren_contents.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "llvm/Support/Casting.h" namespace Carbon::Testing { diff --git a/explorer/ast/return_term.h b/explorer/ast/return_term.h index b3c7ff2eec649..b7af6b6b3f0b2 100644 --- a/explorer/ast/return_term.h +++ b/explorer/ast/return_term.h @@ -12,8 +12,8 @@ #include "common/ostream.h" #include "explorer/ast/clone_context.h" #include "explorer/ast/expression.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" namespace Carbon { diff --git a/explorer/ast/statement.cpp b/explorer/ast/statement.cpp index cedb508cc5acf..830af0a20ead9 100644 --- a/explorer/ast/statement.cpp +++ b/explorer/ast/statement.cpp @@ -6,7 +6,7 @@ #include "common/check.h" #include "explorer/ast/declaration.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "llvm/Support/Casting.h" namespace Carbon { diff --git a/explorer/ast/statement.h b/explorer/ast/statement.h index 716afdd8ccb41..a157797f2ebaa 100644 --- a/explorer/ast/statement.h +++ b/explorer/ast/statement.h @@ -16,8 +16,8 @@ #include "explorer/ast/pattern.h" #include "explorer/ast/return_term.h" #include "explorer/ast/value_node.h" -#include "explorer/common/arena.h" -#include "explorer/common/source_location.h" +#include "explorer/base/arena.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Compiler.h" diff --git a/explorer/ast/static_scope.cpp b/explorer/ast/static_scope.cpp index d9f050848dffe..e0cbde161c712 100644 --- a/explorer/ast/static_scope.cpp +++ b/explorer/ast/static_scope.cpp @@ -7,7 +7,7 @@ #include #include "common/ostream.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/Support/Error.h" diff --git a/explorer/ast/static_scope.h b/explorer/ast/static_scope.h index 746807c388258..52b575026fdb3 100644 --- a/explorer/ast/static_scope.h +++ b/explorer/ast/static_scope.h @@ -10,9 +10,9 @@ #include "common/error.h" #include "explorer/ast/value_node.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" +#include "explorer/base/trace_stream.h" #include "llvm/ADT/StringMap.h" namespace Carbon { diff --git a/explorer/ast/value.cpp b/explorer/ast/value.cpp index 5db3634f317ec..f406a2a6e32d2 100644 --- a/explorer/ast/value.cpp +++ b/explorer/ast/value.cpp @@ -14,8 +14,8 @@ #include "explorer/ast/element.h" #include "explorer/ast/element_path.h" #include "explorer/ast/value_transform.h" -#include "explorer/common/arena.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/arena.h" +#include "explorer/base/error_builders.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Casting.h" diff --git a/explorer/ast/value.h b/explorer/ast/value.h index 87569632af45b..894598e13d0ec 100644 --- a/explorer/ast/value.h +++ b/explorer/ast/value.h @@ -18,7 +18,7 @@ #include "explorer/ast/element_path.h" #include "explorer/ast/expression_category.h" #include "explorer/ast/statement.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Compiler.h" diff --git a/explorer/ast/value_node.h b/explorer/ast/value_node.h index c56a178a9ee06..39b61f547e73f 100644 --- a/explorer/ast/value_node.h +++ b/explorer/ast/value_node.h @@ -12,7 +12,7 @@ #include "explorer/ast/ast_node.h" #include "explorer/ast/clone_context.h" #include "explorer/ast/expression_category.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" namespace Carbon { diff --git a/explorer/common/BUILD b/explorer/base/BUILD similarity index 98% rename from explorer/common/BUILD rename to explorer/base/BUILD index 39cf3b95ee90a..0ab0a545723d3 100644 --- a/explorer/common/BUILD +++ b/explorer/base/BUILD @@ -86,7 +86,7 @@ cc_library( ":source_location", "//common:check", "//common:ostream", - "//explorer/common:nonnull", + "//explorer/base:nonnull", "@llvm-project//llvm:Support", ], ) diff --git a/explorer/common/arena.h b/explorer/base/arena.h similarity index 98% rename from explorer/common/arena.h rename to explorer/base/arena.h index 807f3c09df759..d473c88f901d4 100644 --- a/explorer/common/arena.h +++ b/explorer/base/arena.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_EXPLORER_COMMON_ARENA_H_ -#define CARBON_EXPLORER_COMMON_ARENA_H_ +#ifndef CARBON_EXPLORER_BASE_ARENA_H_ +#define CARBON_EXPLORER_BASE_ARENA_H_ #include #include @@ -13,7 +13,7 @@ #include #include -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "llvm/ADT/Hashing.h" namespace Carbon { @@ -277,4 +277,4 @@ char Arena::TypeId::id = 1; } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_ARENA_H_ +#endif // CARBON_EXPLORER_BASE_ARENA_H_ diff --git a/explorer/common/arena_test.cpp b/explorer/base/arena_test.cpp similarity index 98% rename from explorer/common/arena_test.cpp rename to explorer/base/arena_test.cpp index 7af4a7f503458..54efce59acb97 100644 --- a/explorer/common/arena_test.cpp +++ b/explorer/base/arena_test.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include diff --git a/explorer/common/decompose.h b/explorer/base/decompose.h similarity index 92% rename from explorer/common/decompose.h rename to explorer/base/decompose.h index f772c03118205..b588229ffb622 100644 --- a/explorer/common/decompose.h +++ b/explorer/base/decompose.h @@ -4,8 +4,8 @@ // // Utilities for types that support the `Decompose` API. -#ifndef CARBON_EXPLORER_COMMON_DECOMPOSE_H_ -#define CARBON_EXPLORER_COMMON_DECOMPOSE_H_ +#ifndef CARBON_EXPLORER_BASE_DECOMPOSE_H_ +#define CARBON_EXPLORER_BASE_DECOMPOSE_H_ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Hashing.h" @@ -51,4 +51,4 @@ class HashFromDecompose { } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_DECOMPOSE_H_ +#endif // CARBON_EXPLORER_BASE_DECOMPOSE_H_ diff --git a/explorer/common/decompose_test.cpp b/explorer/base/decompose_test.cpp similarity index 95% rename from explorer/common/decompose_test.cpp rename to explorer/base/decompose_test.cpp index 66c6d33c9dc0e..be331d648cdd7 100644 --- a/explorer/common/decompose_test.cpp +++ b/explorer/base/decompose_test.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "explorer/common/decompose.h" +#include "explorer/base/decompose.h" #include diff --git a/explorer/common/error_builders.h b/explorer/base/error_builders.h similarity index 77% rename from explorer/common/error_builders.h rename to explorer/base/error_builders.h index 1ccd40bf845d0..4e72f3dc964fd 100644 --- a/explorer/common/error_builders.h +++ b/explorer/base/error_builders.h @@ -2,11 +2,11 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_EXPLORER_COMMON_ERROR_BUILDERS_H_ -#define CARBON_EXPLORER_COMMON_ERROR_BUILDERS_H_ +#ifndef CARBON_EXPLORER_BASE_ERROR_BUILDERS_H_ +#define CARBON_EXPLORER_BASE_ERROR_BUILDERS_H_ #include "common/error.h" -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" namespace Carbon { @@ -23,4 +23,4 @@ inline auto ProgramError(SourceLocation loc) -> ErrorBuilder { } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_ERROR_BUILDERS_H_ +#endif // CARBON_EXPLORER_BASE_ERROR_BUILDERS_H_ diff --git a/explorer/common/error_builders_test.cpp b/explorer/base/error_builders_test.cpp similarity index 87% rename from explorer/common/error_builders_test.cpp rename to explorer/base/error_builders_test.cpp index 2425cdde4f794..6e46d10780749 100644 --- a/explorer/common/error_builders_test.cpp +++ b/explorer/base/error_builders_test.cpp @@ -2,11 +2,11 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" #include -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" #include "testing/util/test_raw_ostream.h" namespace Carbon::Testing { diff --git a/explorer/common/nonnull.h b/explorer/base/nonnull.h similarity index 82% rename from explorer/common/nonnull.h rename to explorer/base/nonnull.h index c9f63c3a1685a..2bd6a48d752e0 100644 --- a/explorer/common/nonnull.h +++ b/explorer/base/nonnull.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_EXPLORER_COMMON_NONNULL_H_ -#define CARBON_EXPLORER_COMMON_NONNULL_H_ +#ifndef CARBON_EXPLORER_BASE_NONNULL_H_ +#define CARBON_EXPLORER_BASE_NONNULL_H_ #include @@ -19,4 +19,4 @@ using Nonnull = T _Nonnull; } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_NONNULL_H_ +#endif // CARBON_EXPLORER_BASE_NONNULL_H_ diff --git a/explorer/common/set_file_context_raii_test.cpp b/explorer/base/set_file_context_raii_test.cpp similarity index 96% rename from explorer/common/set_file_context_raii_test.cpp rename to explorer/base/set_file_context_raii_test.cpp index 61a1b8c86c266..647bf67584832 100644 --- a/explorer/common/set_file_context_raii_test.cpp +++ b/explorer/base/set_file_context_raii_test.cpp @@ -5,7 +5,7 @@ #include #include -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" namespace Carbon::Testing { namespace { diff --git a/explorer/common/set_program_phase_raii_test.cpp b/explorer/base/set_program_phase_raii_test.cpp similarity index 96% rename from explorer/common/set_program_phase_raii_test.cpp rename to explorer/base/set_program_phase_raii_test.cpp index 44db34f66761e..0aa659b5706be 100644 --- a/explorer/common/set_program_phase_raii_test.cpp +++ b/explorer/base/set_program_phase_raii_test.cpp @@ -5,7 +5,7 @@ #include #include -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" namespace Carbon::Testing { namespace { diff --git a/explorer/common/source_location.h b/explorer/base/source_location.h similarity index 92% rename from explorer/common/source_location.h rename to explorer/base/source_location.h index cc46cc37f736f..0067bedec4b2c 100644 --- a/explorer/common/source_location.h +++ b/explorer/base/source_location.h @@ -2,14 +2,14 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_EXPLORER_COMMON_SOURCE_LOCATION_H_ -#define CARBON_EXPLORER_COMMON_SOURCE_LOCATION_H_ +#ifndef CARBON_EXPLORER_BASE_SOURCE_LOCATION_H_ +#define CARBON_EXPLORER_BASE_SOURCE_LOCATION_H_ #include #include #include "common/ostream.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" namespace Carbon { @@ -72,4 +72,4 @@ class SourceLocation { } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_SOURCE_LOCATION_H_ +#endif // CARBON_EXPLORER_BASE_SOURCE_LOCATION_H_ diff --git a/explorer/common/trace_stream.h b/explorer/base/trace_stream.h similarity index 97% rename from explorer/common/trace_stream.h rename to explorer/base/trace_stream.h index bd8ef73cb0b5a..515ab7b155184 100644 --- a/explorer/common/trace_stream.h +++ b/explorer/base/trace_stream.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_EXPLORER_COMMON_TRACE_STREAM_H_ -#define CARBON_EXPLORER_COMMON_TRACE_STREAM_H_ +#ifndef CARBON_EXPLORER_BASE_TRACE_STREAM_H_ +#define CARBON_EXPLORER_BASE_TRACE_STREAM_H_ #include #include @@ -13,8 +13,8 @@ #include "common/check.h" #include "common/ostream.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/ArrayRef.h" namespace Carbon { @@ -205,4 +205,4 @@ class SetFileContext { } // namespace Carbon -#endif // CARBON_EXPLORER_COMMON_TRACE_STREAM_H_ +#endif // CARBON_EXPLORER_BASE_TRACE_STREAM_H_ diff --git a/explorer/fuzzing/BUILD b/explorer/fuzzing/BUILD index 9edaf6beed245..95e7ff2119e79 100644 --- a/explorer/fuzzing/BUILD +++ b/explorer/fuzzing/BUILD @@ -25,7 +25,7 @@ cc_binary( "//common:bazel_working_dir", "//common:error", "//explorer/ast", - "//explorer/common:arena", + "//explorer/base:arena", "//explorer/syntax", "//testing/fuzzing:carbon_cc_proto", "@com_google_protobuf//:protobuf_headers", diff --git a/explorer/fuzzing/ast_to_proto_main.cpp b/explorer/fuzzing/ast_to_proto_main.cpp index 590ca9ed44600..7a62fb5139a83 100644 --- a/explorer/fuzzing/ast_to_proto_main.cpp +++ b/explorer/fuzzing/ast_to_proto_main.cpp @@ -14,7 +14,7 @@ #include "common/bazel_working_dir.h" #include "common/error.h" #include "explorer/ast/ast.h" -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" #include "explorer/fuzzing/ast_to_proto.h" #include "explorer/syntax/parse.h" #include "testing/fuzzing/carbon.pb.h" diff --git a/explorer/interpreter/BUILD b/explorer/interpreter/BUILD index bd3f6faa8ac5e..58448fde4ebd1 100644 --- a/explorer/interpreter/BUILD +++ b/explorer/interpreter/BUILD @@ -20,10 +20,10 @@ cc_library( "//common:error", "//common:ostream", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", + "//explorer/base:arena", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", "@llvm-project//llvm:Support", ], ) @@ -43,7 +43,7 @@ cc_library( "//common:error", "//common:ostream", "//explorer/ast", - "//explorer/common:trace_stream", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -51,7 +51,7 @@ cc_library( cc_library( name = "dictionary", hdrs = ["dictionary.h"], - deps = ["//explorer/common:arena"], + deps = ["//explorer/base:arena"], ) cc_library( @@ -68,8 +68,8 @@ cc_library( "//common:error", "//common:ostream", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:trace_stream", + "//explorer/base:arena", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -85,10 +85,10 @@ cc_library( "//common:error", "//common:ostream", "//explorer/ast", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", - "//explorer/common:trace_stream", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -99,9 +99,9 @@ cc_library( deps = [ "//common:error", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:nonnull", - "//explorer/common:source_location", + "//explorer/base:arena", + "//explorer/base:nonnull", + "//explorer/base:source_location", ], ) @@ -125,10 +125,10 @@ cc_library( "//common:ostream", "//explorer/ast", "//explorer/ast:expression_category", - "//explorer/common:arena", - "//explorer/common:error_builders", - "//explorer/common:source_location", - "//explorer/common:trace_stream", + "//explorer/base:arena", + "//explorer/base:error_builders", + "//explorer/base:source_location", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -140,9 +140,9 @@ cc_library( deps = [ "//common:check", "//explorer/ast", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:trace_stream", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -156,8 +156,8 @@ cc_library( "//common:check", "//explorer/ast", "//explorer/ast:static_scope", - "//explorer/common:arena", - "//explorer/common:trace_stream", + "//explorer/base:arena", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -180,7 +180,7 @@ cc_library( ":action", "//common:error", "//explorer/ast", - "//explorer/common:nonnull", + "//explorer/base:nonnull", "@llvm-project//llvm:Support", ], ) @@ -216,11 +216,11 @@ cc_library( "//common:error", "//common:ostream", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", - "//explorer/common:trace_stream", + "//explorer/base:arena", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -238,9 +238,9 @@ cc_library( "//common:check", "//explorer/ast", "//explorer/ast:static_scope", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:trace_stream", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) @@ -268,7 +268,7 @@ cc_library( "//common:ostream", "//explorer/ast", "//explorer/ast:expression_category", - "//explorer/common:nonnull", + "//explorer/base:nonnull", "@llvm-project//llvm:Support", ], ) @@ -283,7 +283,7 @@ cc_library( ], deps = [ "//explorer/ast", - "//explorer/common:nonnull", + "//explorer/base:nonnull", "@llvm-project//llvm:Support", ], ) @@ -299,10 +299,10 @@ cc_library( deps = [ ":action", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:nonnull", - "//explorer/common:source_location", - "//explorer/common:trace_stream", + "//explorer/base:arena", + "//explorer/base:nonnull", + "//explorer/base:source_location", + "//explorer/base:trace_stream", "@llvm-project//llvm:Support", ], ) diff --git a/explorer/interpreter/action.cpp b/explorer/interpreter/action.cpp index b9a6557782cc5..ec995c4fe7c65 100644 --- a/explorer/interpreter/action.cpp +++ b/explorer/interpreter/action.cpp @@ -15,8 +15,8 @@ #include "explorer/ast/declaration.h" #include "explorer/ast/expression.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" -#include "explorer/common/source_location.h" +#include "explorer/base/arena.h" +#include "explorer/base/source_location.h" #include "explorer/interpreter/stack.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Casting.h" diff --git a/explorer/interpreter/action.h b/explorer/interpreter/action.h index ddda48191d992..46851f4318633 100644 --- a/explorer/interpreter/action.h +++ b/explorer/interpreter/action.h @@ -18,7 +18,7 @@ #include "explorer/ast/pattern.h" #include "explorer/ast/statement.h" #include "explorer/ast/value.h" -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" #include "explorer/interpreter/dictionary.h" #include "explorer/interpreter/heap_allocation_interface.h" #include "explorer/interpreter/stack.h" diff --git a/explorer/interpreter/action_stack.h b/explorer/interpreter/action_stack.h index 587c7c19d8230..5f70fd7ce589d 100644 --- a/explorer/interpreter/action_stack.h +++ b/explorer/interpreter/action_stack.h @@ -12,7 +12,7 @@ #include "common/ostream.h" #include "explorer/ast/statement.h" #include "explorer/ast/value.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/action.h" namespace Carbon { diff --git a/explorer/interpreter/builtins.cpp b/explorer/interpreter/builtins.cpp index f99f5c2760e6b..579ac6817f81d 100644 --- a/explorer/interpreter/builtins.cpp +++ b/explorer/interpreter/builtins.cpp @@ -4,7 +4,7 @@ #include "explorer/interpreter/builtins.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" using llvm::dyn_cast; diff --git a/explorer/interpreter/builtins.h b/explorer/interpreter/builtins.h index 180ae271d741b..d983ac1c63fde 100644 --- a/explorer/interpreter/builtins.h +++ b/explorer/interpreter/builtins.h @@ -14,8 +14,8 @@ #include "explorer/ast/declaration.h" #include "explorer/ast/expression.h" #include "explorer/ast/value.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" namespace Carbon { diff --git a/explorer/interpreter/dictionary.h b/explorer/interpreter/dictionary.h index 7f3dbb2b53494..487fdccbd313e 100644 --- a/explorer/interpreter/dictionary.h +++ b/explorer/interpreter/dictionary.h @@ -8,7 +8,7 @@ #include #include -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" namespace Carbon { diff --git a/explorer/interpreter/exec_program.cpp b/explorer/interpreter/exec_program.cpp index 26570b7478497..21bf90fef77ad 100644 --- a/explorer/interpreter/exec_program.cpp +++ b/explorer/interpreter/exec_program.cpp @@ -9,8 +9,8 @@ #include "common/check.h" #include "common/error.h" #include "common/ostream.h" -#include "explorer/common/arena.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/arena.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/interpreter.h" #include "explorer/interpreter/resolve_control_flow.h" #include "explorer/interpreter/resolve_names.h" diff --git a/explorer/interpreter/exec_program.h b/explorer/interpreter/exec_program.h index 12998d2c0cb69..959663501cc0d 100644 --- a/explorer/interpreter/exec_program.h +++ b/explorer/interpreter/exec_program.h @@ -10,7 +10,7 @@ #define CARBON_EXPLORER_INTERPRETER_EXEC_PROGRAM_H_ #include "explorer/ast/ast.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "llvm/Support/raw_ostream.h" namespace Carbon { diff --git a/explorer/interpreter/heap.cpp b/explorer/interpreter/heap.cpp index 92975e39f2336..2a35e8d59dabb 100644 --- a/explorer/interpreter/heap.cpp +++ b/explorer/interpreter/heap.cpp @@ -7,8 +7,8 @@ #include "common/check.h" #include "common/error.h" #include "explorer/ast/value.h" -#include "explorer/common/error_builders.h" -#include "explorer/common/source_location.h" +#include "explorer/base/error_builders.h" +#include "explorer/base/source_location.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Error.h" diff --git a/explorer/interpreter/heap.h b/explorer/interpreter/heap.h index d701639c1053b..13ef47f4be6a1 100644 --- a/explorer/interpreter/heap.h +++ b/explorer/interpreter/heap.h @@ -11,9 +11,9 @@ #include "explorer/ast/address.h" #include "explorer/ast/value.h" #include "explorer/ast/value_node.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/heap_allocation_interface.h" namespace Carbon { diff --git a/explorer/interpreter/heap_allocation_interface.h b/explorer/interpreter/heap_allocation_interface.h index 84ece4ca9ed2b..01bd76bcaddb4 100644 --- a/explorer/interpreter/heap_allocation_interface.h +++ b/explorer/interpreter/heap_allocation_interface.h @@ -8,9 +8,9 @@ #include "common/error.h" #include "explorer/ast/address.h" #include "explorer/ast/value_node.h" -#include "explorer/common/arena.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/arena.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" namespace Carbon { diff --git a/explorer/interpreter/interpreter.cpp b/explorer/interpreter/interpreter.cpp index 9592b889815e3..e967b8d27fb8c 100644 --- a/explorer/interpreter/interpreter.cpp +++ b/explorer/interpreter/interpreter.cpp @@ -22,10 +22,10 @@ #include "explorer/ast/expression.h" #include "explorer/ast/expression_category.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" -#include "explorer/common/error_builders.h" -#include "explorer/common/source_location.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/arena.h" +#include "explorer/base/error_builders.h" +#include "explorer/base/source_location.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/action.h" #include "explorer/interpreter/action_stack.h" #include "explorer/interpreter/pattern_match.h" diff --git a/explorer/interpreter/interpreter.h b/explorer/interpreter/interpreter.h index b312ca00e0756..3b5f4f9596279 100644 --- a/explorer/interpreter/interpreter.h +++ b/explorer/interpreter/interpreter.h @@ -15,7 +15,7 @@ #include "explorer/ast/expression.h" #include "explorer/ast/pattern.h" #include "explorer/ast/value.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/action.h" #include "explorer/interpreter/heap.h" #include "llvm/ADT/ArrayRef.h" diff --git a/explorer/interpreter/matching_impl_set.cpp b/explorer/interpreter/matching_impl_set.cpp index e902e0e64f3cd..a3b2bf4dac2bb 100644 --- a/explorer/interpreter/matching_impl_set.cpp +++ b/explorer/interpreter/matching_impl_set.cpp @@ -6,9 +6,9 @@ #include "common/error.h" #include "explorer/ast/declaration.h" #include "explorer/ast/value.h" -#include "explorer/common/error_builders.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/error_builders.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" #include "explorer/interpreter/type_checker.h" namespace Carbon { diff --git a/explorer/interpreter/matching_impl_set.h b/explorer/interpreter/matching_impl_set.h index 886a84a22cde2..de80ce341f4a3 100644 --- a/explorer/interpreter/matching_impl_set.h +++ b/explorer/interpreter/matching_impl_set.h @@ -10,7 +10,7 @@ #include "common/ostream.h" #include "explorer/ast/declaration.h" #include "explorer/ast/value.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "explorer/interpreter/impl_scope.h" #include "llvm/ADT/DenseMap.h" diff --git a/explorer/interpreter/pattern_analysis.h b/explorer/interpreter/pattern_analysis.h index 85d6c81ebf33b..378f68d5e2c55 100644 --- a/explorer/interpreter/pattern_analysis.h +++ b/explorer/interpreter/pattern_analysis.h @@ -9,7 +9,7 @@ #include "explorer/ast/pattern.h" #include "explorer/ast/value.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "llvm/ADT/PointerUnion.h" namespace Carbon { diff --git a/explorer/interpreter/pattern_match.cpp b/explorer/interpreter/pattern_match.cpp index 30166fc78b4e6..96c32c8e09336 100644 --- a/explorer/interpreter/pattern_match.cpp +++ b/explorer/interpreter/pattern_match.cpp @@ -5,8 +5,8 @@ #include "explorer/interpreter/pattern_match.h" #include "explorer/ast/value.h" -#include "explorer/common/arena.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/arena.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/action.h" #include "llvm/Support/Casting.h" diff --git a/explorer/interpreter/pattern_match.h b/explorer/interpreter/pattern_match.h index ef54c66455c46..a97aeb820402b 100644 --- a/explorer/interpreter/pattern_match.h +++ b/explorer/interpreter/pattern_match.h @@ -9,8 +9,8 @@ #include "explorer/ast/bindings.h" #include "explorer/ast/value.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/source_location.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/source_location.h" namespace Carbon { diff --git a/explorer/interpreter/resolve_control_flow.cpp b/explorer/interpreter/resolve_control_flow.cpp index 94e722d558608..a0ac58cb46780 100644 --- a/explorer/interpreter/resolve_control_flow.cpp +++ b/explorer/interpreter/resolve_control_flow.cpp @@ -7,7 +7,7 @@ #include "explorer/ast/declaration.h" #include "explorer/ast/return_term.h" #include "explorer/ast/statement.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Error.h" diff --git a/explorer/interpreter/resolve_control_flow.h b/explorer/interpreter/resolve_control_flow.h index 09ee8eccbd78e..1ff461f2b1c9a 100644 --- a/explorer/interpreter/resolve_control_flow.h +++ b/explorer/interpreter/resolve_control_flow.h @@ -6,8 +6,8 @@ #define CARBON_EXPLORER_INTERPRETER_RESOLVE_CONTROL_FLOW_H_ #include "explorer/ast/ast.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/trace_stream.h" namespace Carbon { diff --git a/explorer/interpreter/resolve_names.h b/explorer/interpreter/resolve_names.h index 7b8be2510db31..8e231df8e17a5 100644 --- a/explorer/interpreter/resolve_names.h +++ b/explorer/interpreter/resolve_names.h @@ -6,8 +6,8 @@ #define CARBON_EXPLORER_INTERPRETER_RESOLVE_NAMES_H_ #include "explorer/ast/ast.h" -#include "explorer/common/arena.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/arena.h" +#include "explorer/base/trace_stream.h" namespace Carbon { diff --git a/explorer/interpreter/resolve_unformed.cpp b/explorer/interpreter/resolve_unformed.cpp index ab2e248c8eb7b..b9bd2bdcea84c 100644 --- a/explorer/interpreter/resolve_unformed.cpp +++ b/explorer/interpreter/resolve_unformed.cpp @@ -10,7 +10,7 @@ #include "explorer/ast/ast.h" #include "explorer/ast/expression.h" #include "explorer/ast/pattern.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "explorer/interpreter/stack_space.h" using llvm::cast; diff --git a/explorer/interpreter/resolve_unformed.h b/explorer/interpreter/resolve_unformed.h index 4b9caa36f2564..f572b4ded37b5 100644 --- a/explorer/interpreter/resolve_unformed.h +++ b/explorer/interpreter/resolve_unformed.h @@ -9,8 +9,8 @@ #include #include "explorer/ast/ast.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/trace_stream.h" namespace Carbon { diff --git a/explorer/interpreter/type_checker.cpp b/explorer/interpreter/type_checker.cpp index 3e522e6d295e5..fac635065b12a 100644 --- a/explorer/interpreter/type_checker.cpp +++ b/explorer/interpreter/type_checker.cpp @@ -22,10 +22,10 @@ #include "explorer/ast/pattern.h" #include "explorer/ast/value.h" #include "explorer/ast/value_transform.h" -#include "explorer/common/arena.h" -#include "explorer/common/error_builders.h" -#include "explorer/common/source_location.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/arena.h" +#include "explorer/base/error_builders.h" +#include "explorer/base/source_location.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/impl_scope.h" #include "explorer/interpreter/interpreter.h" #include "explorer/interpreter/pattern_analysis.h" diff --git a/explorer/interpreter/type_checker.h b/explorer/interpreter/type_checker.h index 6945440fb686f..ce52ffa8e9e1f 100644 --- a/explorer/interpreter/type_checker.h +++ b/explorer/interpreter/type_checker.h @@ -18,8 +18,8 @@ #include "explorer/ast/expression.h" #include "explorer/ast/statement.h" #include "explorer/ast/value.h" -#include "explorer/common/nonnull.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/nonnull.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/builtins.h" #include "explorer/interpreter/dictionary.h" #include "explorer/interpreter/impl_scope.h" diff --git a/explorer/interpreter/type_structure.h b/explorer/interpreter/type_structure.h index bfa365178b7d9..862fb7b152dba 100644 --- a/explorer/interpreter/type_structure.h +++ b/explorer/interpreter/type_structure.h @@ -8,7 +8,7 @@ #include #include "common/ostream.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" #include "llvm/Support/Compiler.h" namespace Carbon { diff --git a/explorer/interpreter/type_utils.h b/explorer/interpreter/type_utils.h index e951e56f0f089..37367d42a943f 100644 --- a/explorer/interpreter/type_utils.h +++ b/explorer/interpreter/type_utils.h @@ -5,7 +5,7 @@ #ifndef CARBON_EXPLORER_INTERPRETER_TYPE_UTILS_H_ #define CARBON_EXPLORER_INTERPRETER_TYPE_UTILS_H_ -#include "explorer/common/nonnull.h" +#include "explorer/base/nonnull.h" namespace Carbon { diff --git a/explorer/main.cpp b/explorer/main.cpp index ead23a2166c19..3d70c6b8dea9d 100644 --- a/explorer/main.cpp +++ b/explorer/main.cpp @@ -15,7 +15,7 @@ #include #include "common/error.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "explorer/parse_and_execute/parse_and_execute.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallString.h" diff --git a/explorer/parse_and_execute/BUILD b/explorer/parse_and_execute/BUILD index e9f7276306a46..9638c8686566c 100644 --- a/explorer/parse_and_execute/BUILD +++ b/explorer/parse_and_execute/BUILD @@ -14,7 +14,7 @@ cc_library( deps = [ "//common:check", "//common:error", - "//explorer/common:trace_stream", + "//explorer/base:trace_stream", "//explorer/interpreter:exec_program", "//explorer/interpreter:stack_space", "//explorer/syntax", diff --git a/explorer/parse_and_execute/parse_and_execute.cpp b/explorer/parse_and_execute/parse_and_execute.cpp index a1a8a39f0ebca..16cdb24e49fd6 100644 --- a/explorer/parse_and_execute/parse_and_execute.cpp +++ b/explorer/parse_and_execute/parse_and_execute.cpp @@ -7,7 +7,7 @@ #include #include "common/error.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "explorer/interpreter/exec_program.h" #include "explorer/interpreter/stack_space.h" #include "explorer/syntax/parse.h" diff --git a/explorer/parse_and_execute/parse_and_execute.h b/explorer/parse_and_execute/parse_and_execute.h index d31eae6edbd31..28cc3a14b091f 100644 --- a/explorer/parse_and_execute/parse_and_execute.h +++ b/explorer/parse_and_execute/parse_and_execute.h @@ -6,7 +6,7 @@ #define CARBON_EXPLORER_PARSE_AND_EXECUTE_PARSE_AND_EXECUTE_H_ #include "common/error.h" -#include "explorer/common/trace_stream.h" +#include "explorer/base/trace_stream.h" #include "llvm/Support/VirtualFileSystem.h" namespace Carbon { diff --git a/explorer/syntax/BUILD b/explorer/syntax/BUILD index 9efc2771c36e5..fc3369dc3d6e9 100644 --- a/explorer/syntax/BUILD +++ b/explorer/syntax/BUILD @@ -15,7 +15,7 @@ cc_test( srcs = ["parse_test.cpp"], deps = [ ":syntax", - "//explorer/common:arena", + "//explorer/base:arena", "//testing/util:gtest_main", "@com_google_googletest//:gtest", ], @@ -42,8 +42,8 @@ cc_library( ":syntax", "//common:error", "//explorer/ast", - "//explorer/common:arena", - "//explorer/common:nonnull", + "//explorer/base:arena", + "//explorer/base:nonnull", "@llvm-project//llvm:Support", ], ) @@ -86,10 +86,10 @@ cc_library( "//explorer/ast", "//explorer/ast:expression_category", "//explorer/ast:paren_contents", - "//explorer/common:arena", - "//explorer/common:error_builders", - "//explorer/common:nonnull", - "//explorer/common:source_location", + "//explorer/base:arena", + "//explorer/base:error_builders", + "//explorer/base:nonnull", + "//explorer/base:source_location", "@llvm-project//llvm:Support", ], ) diff --git a/explorer/syntax/parse.cpp b/explorer/syntax/parse.cpp index c7d13948e389c..51472e0f99200 100644 --- a/explorer/syntax/parse.cpp +++ b/explorer/syntax/parse.cpp @@ -6,7 +6,7 @@ #include "common/check.h" #include "common/error.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" #include "explorer/syntax/lexer.h" #include "explorer/syntax/parse_and_lex_context.h" #include "explorer/syntax/parser.h" diff --git a/explorer/syntax/parse.h b/explorer/syntax/parse.h index b0ff5816366c4..623cac3119e17 100644 --- a/explorer/syntax/parse.h +++ b/explorer/syntax/parse.h @@ -9,8 +9,8 @@ #include #include "explorer/ast/ast.h" -#include "explorer/common/arena.h" -#include "explorer/common/source_location.h" +#include "explorer/base/arena.h" +#include "explorer/base/source_location.h" #include "llvm/Support/VirtualFileSystem.h" namespace Carbon { diff --git a/explorer/syntax/parse_and_lex_context.cpp b/explorer/syntax/parse_and_lex_context.cpp index 914cddc68f120..ad31415dc0d29 100644 --- a/explorer/syntax/parse_and_lex_context.cpp +++ b/explorer/syntax/parse_and_lex_context.cpp @@ -4,7 +4,7 @@ #include "explorer/syntax/parse_and_lex_context.h" -#include "explorer/common/error_builders.h" +#include "explorer/base/error_builders.h" namespace Carbon { diff --git a/explorer/syntax/parse_and_lex_context.h b/explorer/syntax/parse_and_lex_context.h index 6c5551bb2863d..5aa5fed2e20b1 100644 --- a/explorer/syntax/parse_and_lex_context.h +++ b/explorer/syntax/parse_and_lex_context.h @@ -8,7 +8,7 @@ #include #include "explorer/ast/ast.h" -#include "explorer/common/source_location.h" +#include "explorer/base/source_location.h" #include "explorer/syntax/parser.h" // from parser.ypp namespace Carbon { diff --git a/explorer/syntax/parse_test.cpp b/explorer/syntax/parse_test.cpp index ca8f0db408302..8588de59fb359 100644 --- a/explorer/syntax/parse_test.cpp +++ b/explorer/syntax/parse_test.cpp @@ -10,7 +10,7 @@ #include #include -#include "explorer/common/arena.h" +#include "explorer/base/arena.h" namespace Carbon::Testing { namespace { diff --git a/explorer/syntax/parser.ypp b/explorer/syntax/parser.ypp index d1b310129fe4d..df93d329180e3 100644 --- a/explorer/syntax/parser.ypp +++ b/explorer/syntax/parser.ypp @@ -74,8 +74,8 @@ #include "explorer/ast/expression_category.h" #include "explorer/ast/paren_contents.h" #include "explorer/ast/pattern.h" - #include "explorer/common/arena.h" - #include "explorer/common/nonnull.h" + #include "explorer/base/arena.h" + #include "explorer/base/nonnull.h" #include "explorer/syntax/bison_wrap.h" namespace Carbon { diff --git a/explorer/syntax/prelude.h b/explorer/syntax/prelude.h index d17ecb5a4a35b..1843c7ef81461 100644 --- a/explorer/syntax/prelude.h +++ b/explorer/syntax/prelude.h @@ -8,8 +8,8 @@ #include #include "explorer/ast/declaration.h" -#include "explorer/common/arena.h" -#include "explorer/common/nonnull.h" +#include "explorer/base/arena.h" +#include "explorer/base/nonnull.h" #include "llvm/Support/VirtualFileSystem.h" namespace Carbon {