From 8d456c6e094f0fc192b0fe6a6bfa665f49a5cbb5 Mon Sep 17 00:00:00 2001 From: Justin King Date: Mon, 5 Feb 2024 11:47:48 -0800 Subject: [PATCH] Remove `base/memory.h` PiperOrigin-RevId: 604386157 --- base/BUILD | 13 +- base/function_adapter_test.cc | 2 +- base/internal/BUILD | 2 +- base/internal/function_adapter_test.cc | 2 +- base/memory.h | 145 ------------------ conformance/BUILD | 2 +- eval/compiler/BUILD | 14 +- eval/compiler/constant_folding.h | 2 +- eval/compiler/constant_folding_test.cc | 2 +- eval/compiler/flat_expr_builder.cc | 2 +- .../qualified_reference_resolver_test.cc | 2 +- .../regex_precompilation_optimization_test.cc | 2 +- eval/compiler/resolver.cc | 2 +- eval/compiler/resolver_test.cc | 2 +- eval/eval/BUILD | 6 +- eval/eval/comprehension_slots_test.cc | 2 +- eval/eval/create_struct_step.cc | 2 +- eval/eval/evaluator_core.cc | 2 +- eval/eval/evaluator_core.h | 2 +- eval/internal/BUILD | 2 +- eval/internal/adapter_activation_impl.cc | 2 +- eval/public/BUILD | 10 +- ..._type_registry_protobuf_reflection_test.cc | 2 +- eval/public/cel_type_registry_test.cc | 2 +- eval/public/cel_value.cc | 2 +- eval/public/cel_value.h | 2 +- eval/public/cel_value_test.cc | 2 +- .../portable_cel_expr_builder_factory.cc | 2 +- eval/public/structs/BUILD | 4 +- eval/public/structs/legacy_type_adapter.h | 2 +- .../structs/proto_message_type_adapter.cc | 2 +- .../structs/proto_message_type_adapter.h | 2 +- extensions/BUILD | 4 +- extensions/protobuf/BUILD | 1 - extensions/protobuf/memory_manager.h | 2 +- extensions/select_optimization.cc | 2 +- extensions/sets_functions_benchmark_test.cc | 2 +- runtime/BUILD | 12 +- runtime/activation_test.cc | 2 +- runtime/constant_folding.cc | 2 +- runtime/constant_folding.h | 2 +- runtime/internal/BUILD | 4 +- runtime/internal/mutable_list_impl.h | 2 +- runtime/internal/mutable_list_impl_test.cc | 2 +- runtime/managed_value_factory.h | 2 +- runtime/regex_precompilation.h | 2 +- .../standard_runtime_builder_factory_test.cc | 2 +- 47 files changed, 65 insertions(+), 222 deletions(-) delete mode 100644 base/memory.h diff --git a/base/BUILD b/base/BUILD index 1f2a14305..884a833a6 100644 --- a/base/BUILD +++ b/base/BUILD @@ -52,17 +52,6 @@ cc_library( ], ) -cc_library( - name = "memory", - hdrs = [ - "memory.h", - ], - deps = [ - "//common:memory", - "@com_google_absl//absl/base:core_headers", - ], -) - cc_library( name = "operators", srcs = ["operators.cc"], @@ -203,7 +192,7 @@ cc_test( ":function_adapter", ":function_descriptor", ":kind", - ":memory", + "//common:memory", "//common:value", "//internal:testing", "@com_google_absl//absl/status", diff --git a/base/function_adapter_test.cc b/base/function_adapter_test.cc index 65a785e4d..4efd24d03 100644 --- a/base/function_adapter_test.cc +++ b/base/function_adapter_test.cc @@ -25,12 +25,12 @@ #include "base/function.h" #include "base/function_descriptor.h" #include "base/kind.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_factory.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_type_reflector.h" #include "common/values/legacy_value_manager.h" diff --git a/base/internal/BUILD b/base/internal/BUILD index 229ff33a5..babd65aaf 100644 --- a/base/internal/BUILD +++ b/base/internal/BUILD @@ -81,7 +81,7 @@ cc_test( ":function_adapter", "//base:data", "//base:kind", - "//base:memory", + "//common:memory", "//common:value", "//internal:testing", "@com_google_absl//absl/status", diff --git a/base/internal/function_adapter_test.cc b/base/internal/function_adapter_test.cc index d865f208e..fa7313c22 100644 --- a/base/internal/function_adapter_test.cc +++ b/base/internal/function_adapter_test.cc @@ -21,12 +21,12 @@ #include "absl/status/statusor.h" #include "absl/time/time.h" #include "base/kind.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_factory.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_type_reflector.h" #include "common/values/legacy_value_manager.h" diff --git a/base/memory.h b/base/memory.h deleted file mode 100644 index 39c1f92df..000000000 --- a/base/memory.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef THIRD_PARTY_CEL_CPP_BASE_MEMORY_H_ -#define THIRD_PARTY_CEL_CPP_BASE_MEMORY_H_ - -#include -#include -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "common/memory.h" // IWYU pragma: export - -namespace cel { - -template -class Allocator; - -// STL allocator implementation which is backed by MemoryManager. -template -class Allocator { - public: - using value_type = T; - using pointer = T*; - using const_pointer = const T*; - using reference = T&; - using const_reference = const T&; - using size_type = size_t; - using difference_type = ptrdiff_t; - using propagate_on_container_move_assignment = std::true_type; - using is_always_equal = std::false_type; - - template - struct rebind final { - using other = Allocator; - }; - - explicit Allocator( - ABSL_ATTRIBUTE_LIFETIME_BOUND MemoryManagerRef memory_manager) - : memory_manager_(memory_manager), - allocation_only_(memory_manager.memory_management() == - MemoryManagement::kPooling) {} - - Allocator(const Allocator&) = default; - - template - Allocator(const Allocator& other) // NOLINT(google-explicit-constructor) - : memory_manager_(other.memory_manager_), - allocation_only_(other.allocation_only_) {} - - pointer allocate(size_type n) { - if (!allocation_only_) { - return static_cast(::operator new( - n * sizeof(T), static_cast(alignof(T)))); - } - if (memory_manager_.pointer_ == nullptr) { - return static_cast( - static_cast(memory_manager_.vpointer_) - ->Allocate(n * sizeof(T), alignof(T))); - } else { - return static_cast( - static_cast( - memory_manager_.vpointer_) - ->Allocate(memory_manager_.pointer_, n * sizeof(T), alignof(T))); - } - } - - pointer allocate(size_type n, const void* hint) { - static_cast(hint); - return allocate(n); - } - - void deallocate(pointer p, size_type n) { - if (!allocation_only_) { - ::operator delete(static_cast(p), n * sizeof(T), - static_cast(alignof(T))); - } - } - - constexpr size_type max_size() const noexcept { - return std::numeric_limits::max() / sizeof(value_type); - } - - pointer address(reference x) const noexcept { return std::addressof(x); } - - const_pointer address(const_reference x) const noexcept { - return std::addressof(x); - } - - void construct(pointer p, const_reference val) { - ::new (static_cast(p)) T(val); - } - - template - void construct(U* p, Args&&... args) { - ::new (static_cast(p)) U(std::forward(args)...); - } - - void destroy(pointer p) { p->~T(); } - - template - void destroy(U* p) { - p->~U(); - } - - template - bool operator==(const Allocator& rhs) const { - return &memory_manager_ == &rhs.memory_manager_; - } - - template - bool operator!=(const Allocator& rhs) const { - return &memory_manager_ != &rhs.memory_manager_; - } - - private: - template - friend class Allocator; - - MemoryManagerRef memory_manager_; - // Ugh. This is here because of legacy behavior. MemoryManagerRef is - // guaranteed to exist during allocation, but not necessarily during - // deallocation. So we store the member variable from MemoryManager. This can - // go away once CelValue and friends are entirely gone and everybody is - // instantiating their own MemoryManager. - bool allocation_only_; -}; - -} // namespace cel - -#endif // THIRD_PARTY_CEL_CPP_BASE_MEMORY_H_ diff --git a/conformance/BUILD b/conformance/BUILD index 358926882..07f11c574 100644 --- a/conformance/BUILD +++ b/conformance/BUILD @@ -48,8 +48,8 @@ cc_binary( deps = [ "//base:data", "//base:kind", - "//base:memory", "//common:any", + "//common:memory", "//eval/public:activation", "//eval/public:builtin_func_registrar", "//eval/public:cel_expr_builder_factory", diff --git a/eval/compiler/BUILD b/eval/compiler/BUILD index fbc57c6c7..44036d65b 100644 --- a/eval/compiler/BUILD +++ b/eval/compiler/BUILD @@ -72,9 +72,9 @@ cc_library( "//base:ast", "//base:builtins", "//base:data", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", + "//common:memory", "//common:value", "//eval/eval:comprehension_step", "//eval/eval:const_value_step", @@ -258,9 +258,9 @@ cc_library( "//base:builtins", "//base:data", "//base:kind", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", + "//common:memory", "//common:value", "//eval/eval:const_value_step", "//eval/eval:evaluator_core", @@ -284,9 +284,9 @@ cc_test( ":resolver", "//base:ast", "//base:data", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", + "//common:memory", "//common:value", "//eval/eval:const_value_step", "//eval/eval:create_list_step", @@ -346,7 +346,7 @@ cc_library( deps = [ "//base:data", "//base:kind", - "//base:memory", + "//common:memory", "//common:type", "//internal:status_macros", "//runtime:function_overload_reference", @@ -371,9 +371,9 @@ cc_test( "//base:ast", "//base:builtins", "//base:data", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", + "//common:memory", "//common:value", "//eval/public:builtin_func_registrar", "//eval/public:cel_function", @@ -424,7 +424,7 @@ cc_test( deps = [ ":resolver", "//base:data", - "//base:memory", + "//common:memory", "//common:value", "//eval/public:cel_function", "//eval/public:cel_function_registry", @@ -471,9 +471,9 @@ cc_test( ":flat_expr_builder_extensions", ":regex_precompilation_optimization", "//base:data", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", + "//common:memory", "//common:value", "//eval/eval:cel_expression_flat_impl", "//eval/eval:evaluator_core", diff --git a/eval/compiler/constant_folding.h b/eval/compiler/constant_folding.h index 53169dc05..b9f4e9949 100644 --- a/eval/compiler/constant_folding.h +++ b/eval/compiler/constant_folding.h @@ -15,7 +15,7 @@ #ifndef THIRD_PARTY_CEL_CPP_EVAL_COMPILER_CONSTANT_FOLDING_H_ #define THIRD_PARTY_CEL_CPP_EVAL_COMPILER_CONSTANT_FOLDING_H_ -#include "base/memory.h" +#include "common/memory.h" #include "eval/compiler/flat_expr_builder_extensions.h" namespace cel::runtime_internal { diff --git a/eval/compiler/constant_folding_test.cc b/eval/compiler/constant_folding_test.cc index d50c9feaf..9e7237917 100644 --- a/eval/compiler/constant_folding_test.cc +++ b/eval/compiler/constant_folding_test.cc @@ -23,10 +23,10 @@ #include "base/ast.h" #include "base/ast_internal/ast_impl.h" #include "base/ast_internal/expr.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "eval/compiler/flat_expr_builder_extensions.h" diff --git a/eval/compiler/flat_expr_builder.cc b/eval/compiler/flat_expr_builder.cc index 37b918fc6..f271c830a 100644 --- a/eval/compiler/flat_expr_builder.cc +++ b/eval/compiler/flat_expr_builder.cc @@ -43,10 +43,10 @@ #include "base/ast_internal/ast_impl.h" #include "base/ast_internal/expr.h" #include "base/builtins.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_provider.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/values/legacy_value_manager.h" #include "eval/compiler/flat_expr_builder_extensions.h" #include "eval/compiler/resolver.h" diff --git a/eval/compiler/qualified_reference_resolver_test.cc b/eval/compiler/qualified_reference_resolver_test.cc index 7a1563fd4..2a96098a6 100644 --- a/eval/compiler/qualified_reference_resolver_test.cc +++ b/eval/compiler/qualified_reference_resolver_test.cc @@ -27,10 +27,10 @@ #include "base/ast_internal/ast_impl.h" #include "base/ast_internal/expr.h" #include "base/builtins.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/values/legacy_value_manager.h" #include "eval/compiler/resolver.h" #include "eval/public/builtin_func_registrar.h" diff --git a/eval/compiler/regex_precompilation_optimization_test.cc b/eval/compiler/regex_precompilation_optimization_test.cc index 5fd47dd63..6b8f2dc22 100644 --- a/eval/compiler/regex_precompilation_optimization_test.cc +++ b/eval/compiler/regex_precompilation_optimization_test.cc @@ -21,10 +21,10 @@ #include "google/api/expr/v1alpha1/syntax.pb.h" #include "base/ast_internal/ast_impl.h" #include "base/ast_internal/expr.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/values/legacy_value_manager.h" #include "eval/compiler/cel_expression_builder_flat_impl.h" #include "eval/compiler/constant_folding.h" diff --git a/eval/compiler/resolver.cc b/eval/compiler/resolver.cc index 2b2520596..6a50cf568 100644 --- a/eval/compiler/resolver.cc +++ b/eval/compiler/resolver.cc @@ -30,9 +30,9 @@ #include "absl/strings/strip.h" #include "absl/types/optional.h" #include "base/kind.h" -#include "base/memory.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/type.h" #include "internal/status_macros.h" #include "runtime/function_overload_reference.h" diff --git a/eval/compiler/resolver_test.cc b/eval/compiler/resolver_test.cc index 80827648a..f7a4fdab1 100644 --- a/eval/compiler/resolver_test.cc +++ b/eval/compiler/resolver_test.cc @@ -20,11 +20,11 @@ #include "absl/status/status.h" #include "absl/types/optional.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "eval/public/cel_function.h" diff --git a/eval/eval/BUILD b/eval/eval/BUILD index 66df9a090..9de478e75 100644 --- a/eval/eval/BUILD +++ b/eval/eval/BUILD @@ -33,7 +33,7 @@ cc_library( ":comprehension_slots", ":evaluator_stack", "//base:data", - "//base:memory", + "//common:memory", "//common:native_type", "//internal:status_macros", "//runtime", @@ -96,7 +96,7 @@ cc_test( ":comprehension_slots", "//base:attributes", "//base:data", - "//base:memory", + "//common:memory", "//common:value", "//internal:testing", ], @@ -317,9 +317,9 @@ cc_library( ":evaluator_core", ":expression_step_base", "//base:data", - "//base:memory", "//base/ast_internal:expr", "//common:json", + "//common:memory", "//common:type", "//common:value", "//eval/internal:errors", diff --git a/eval/eval/comprehension_slots_test.cc b/eval/eval/comprehension_slots_test.cc index ba2cc6c83..dba1104cb 100644 --- a/eval/eval/comprehension_slots_test.cc +++ b/eval/eval/comprehension_slots_test.cc @@ -15,12 +15,12 @@ #include "eval/eval/comprehension_slots.h" #include "base/attribute.h" -#include "base/memory.h" #include "base/type.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "eval/eval/attribute_trail.h" diff --git a/eval/eval/create_struct_step.cc b/eval/eval/create_struct_step.cc index 7b4236110..ad35199ba 100644 --- a/eval/eval/create_struct_step.cc +++ b/eval/eval/create_struct_step.cc @@ -18,10 +18,10 @@ #include "absl/time/time.h" #include "absl/types/optional.h" #include "absl/types/variant.h" -#include "base/memory.h" #include "base/type.h" #include "base/value_manager.h" #include "common/json.h" +#include "common/memory.h" #include "common/type.h" #include "common/value.h" #include "eval/eval/evaluator_core.h" diff --git a/eval/eval/evaluator_core.cc b/eval/eval/evaluator_core.cc index 40e6af40e..e30b2fe23 100644 --- a/eval/eval/evaluator_core.cc +++ b/eval/eval/evaluator_core.cc @@ -26,10 +26,10 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/utility/utility.h" -#include "base/memory.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "internal/status_macros.h" #include "runtime/activation_interface.h" diff --git a/eval/eval/evaluator_core.h b/eval/eval/evaluator_core.h index 6df7e0259..9b44927bc 100644 --- a/eval/eval/evaluator_core.h +++ b/eval/eval/evaluator_core.h @@ -28,12 +28,12 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/span.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/native_type.h" #include "eval/eval/attribute_utility.h" #include "eval/eval/comprehension_slots.h" diff --git a/eval/internal/BUILD b/eval/internal/BUILD index 95f31e64f..4d91461f9 100644 --- a/eval/internal/BUILD +++ b/eval/internal/BUILD @@ -83,7 +83,7 @@ cc_library( ":interop", "//base:attributes", "//base:data", - "//base:memory", + "//common:memory", "//eval/public:base_activation", "//eval/public:cel_value", "//extensions/protobuf:memory_manager", diff --git a/eval/internal/adapter_activation_impl.cc b/eval/internal/adapter_activation_impl.cc index e35adfc5e..489244bef 100644 --- a/eval/internal/adapter_activation_impl.cc +++ b/eval/internal/adapter_activation_impl.cc @@ -18,7 +18,7 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "base/memory.h" +#include "common/memory.h" #include "eval/internal/interop.h" #include "eval/public/cel_value.h" #include "extensions/protobuf/memory_manager.h" diff --git a/eval/public/BUILD b/eval/public/BUILD index 6c8cc801c..0f4706a27 100644 --- a/eval/public/BUILD +++ b/eval/public/BUILD @@ -82,7 +82,7 @@ cc_library( ":message_wrapper", ":unknown_set", "//base:kind", - "//base:memory", + "//common:memory", "//common:native_type", "//eval/internal:errors", "//eval/public/structs:legacy_type_info_apis", @@ -715,7 +715,7 @@ cc_test( deps = [ ":cel_value", ":unknown_set", - "//base:memory", + "//common:memory", "//eval/internal:errors", "//eval/public/structs:trivial_legacy_type_info", "//eval/public/testing:matchers", @@ -936,7 +936,7 @@ cc_test( deps = [ ":cel_type_registry", "//base:data", - "//base:memory", + "//common:memory", "//common:native_type", "//common:type", "//common:value", @@ -958,7 +958,7 @@ cc_test( deps = [ ":cel_type_registry", "//base:data", - "//base:memory", + "//common:memory", "//common:type", "//common:value", "//eval/public/structs:protobuf_descriptor_type_provider", @@ -1239,8 +1239,8 @@ cc_library( ":cel_function", ":cel_options", "//base:kind", - "//base:memory", "//base/ast_internal:ast_impl", + "//common:memory", "//eval/compiler:cel_expression_builder_flat_impl", "//eval/compiler:comprehension_vulnerability_check", "//eval/compiler:constant_folding", diff --git a/eval/public/cel_type_registry_protobuf_reflection_test.cc b/eval/public/cel_type_registry_protobuf_reflection_test.cc index 158b77625..ec8c63874 100644 --- a/eval/public/cel_type_registry_protobuf_reflection_test.cc +++ b/eval/public/cel_type_registry_protobuf_reflection_test.cc @@ -16,9 +16,9 @@ #include "google/protobuf/struct.pb.h" #include "absl/types/optional.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" +#include "common/memory.h" #include "common/type.h" #include "common/values/legacy_value_manager.h" #include "eval/public/cel_type_registry.h" diff --git a/eval/public/cel_type_registry_test.cc b/eval/public/cel_type_registry_test.cc index 1d09dd3d1..1d081a5cb 100644 --- a/eval/public/cel_type_registry_test.cc +++ b/eval/public/cel_type_registry_test.cc @@ -12,12 +12,12 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "base/memory.h" #include "base/type.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/native_type.h" #include "common/type.h" #include "common/value.h" diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc index dabaa545f..b41a68c68 100644 --- a/eval/public/cel_value.cc +++ b/eval/public/cel_value.cc @@ -12,7 +12,7 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "base/memory.h" +#include "common/memory.h" #include "eval/internal/errors.h" #include "eval/public/structs/legacy_type_info_apis.h" #include "extensions/protobuf/memory_manager.h" diff --git a/eval/public/cel_value.h b/eval/public/cel_value.h index bed292c36..d0e419169 100644 --- a/eval/public/cel_value.h +++ b/eval/public/cel_value.h @@ -34,7 +34,7 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "base/kind.h" -#include "base/memory.h" +#include "common/memory.h" #include "common/native_type.h" #include "eval/public/cel_value_internal.h" #include "eval/public/message_wrapper.h" diff --git a/eval/public/cel_value_test.cc b/eval/public/cel_value_test.cc index 2ceeaaf93..0471dc644 100644 --- a/eval/public/cel_value_test.cc +++ b/eval/public/cel_value_test.cc @@ -10,7 +10,7 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" -#include "base/memory.h" +#include "common/memory.h" #include "eval/internal/errors.h" #include "eval/public/structs/trivial_legacy_type_info.h" #include "eval/public/testing/matchers.h" diff --git a/eval/public/portable_cel_expr_builder_factory.cc b/eval/public/portable_cel_expr_builder_factory.cc index 420075cd3..335ed3a76 100644 --- a/eval/public/portable_cel_expr_builder_factory.cc +++ b/eval/public/portable_cel_expr_builder_factory.cc @@ -24,7 +24,7 @@ #include "absl/status/statusor.h" #include "base/ast_internal/ast_impl.h" #include "base/kind.h" -#include "base/memory.h" +#include "common/memory.h" #include "eval/compiler/cel_expression_builder_flat_impl.h" #include "eval/compiler/comprehension_vulnerability_check.h" #include "eval/compiler/constant_folding.h" diff --git a/eval/public/structs/BUILD b/eval/public/structs/BUILD index cf6de1f1f..dd163963c 100644 --- a/eval/public/structs/BUILD +++ b/eval/public/structs/BUILD @@ -218,7 +218,7 @@ cc_library( hdrs = ["legacy_type_adapter.h"], deps = [ "//base:attributes", - "//base:memory", + "//common:memory", "//eval/public:cel_options", "//eval/public:cel_value", "@com_google_absl//absl/status", @@ -255,8 +255,8 @@ cc_library( ":legacy_type_info_apis", "//base:attributes", "//base:builtins", - "//base:memory", "//common:kind", + "//common:memory", "//common:value", "//eval/public:cel_options", "//eval/public:cel_value", diff --git a/eval/public/structs/legacy_type_adapter.h b/eval/public/structs/legacy_type_adapter.h index 24603395a..795c56339 100644 --- a/eval/public/structs/legacy_type_adapter.h +++ b/eval/public/structs/legacy_type_adapter.h @@ -26,7 +26,7 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "base/attribute.h" -#include "base/memory.h" +#include "common/memory.h" #include "eval/public/cel_options.h" #include "eval/public/cel_value.h" diff --git a/eval/public/structs/proto_message_type_adapter.cc b/eval/public/structs/proto_message_type_adapter.cc index 2a2517627..22409b27d 100644 --- a/eval/public/structs/proto_message_type_adapter.cc +++ b/eval/public/structs/proto_message_type_adapter.cc @@ -35,8 +35,8 @@ #include "absl/types/variant.h" #include "base/attribute.h" #include "base/builtins.h" -#include "base/memory.h" #include "common/kind.h" +#include "common/memory.h" #include "common/value.h" #include "eval/public/cel_options.h" #include "eval/public/cel_value.h" diff --git a/eval/public/structs/proto_message_type_adapter.h b/eval/public/structs/proto_message_type_adapter.h index 8edd49e67..fb7dfdf15 100644 --- a/eval/public/structs/proto_message_type_adapter.h +++ b/eval/public/structs/proto_message_type_adapter.h @@ -22,7 +22,7 @@ #include "google/protobuf/message.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include "base/memory.h" +#include "common/memory.h" #include "common/value.h" #include "eval/public/cel_options.h" #include "eval/public/cel_value.h" diff --git a/extensions/BUILD b/extensions/BUILD index c87507097..8ab9f7f91 100644 --- a/extensions/BUILD +++ b/extensions/BUILD @@ -184,10 +184,10 @@ cc_library( "//base:attributes", "//base:builtins", "//base:data", - "//base:memory", "//base/ast_internal:ast_impl", "//base/ast_internal:expr", "//common:kind", + "//common:memory", "//common:type", "//common:value", "//eval/compiler:flat_expr_builder_extensions", @@ -254,7 +254,7 @@ cc_test( deps = [ ":sets_functions", "//base:data", - "//base:memory", + "//common:memory", "//common:value", "//eval/internal:interop", "//eval/public:activation", diff --git a/extensions/protobuf/BUILD b/extensions/protobuf/BUILD index d88d73e0f..8deef9646 100644 --- a/extensions/protobuf/BUILD +++ b/extensions/protobuf/BUILD @@ -24,7 +24,6 @@ cc_library( srcs = ["memory_manager.cc"], hdrs = ["memory_manager.h"], deps = [ - "//base:memory", "//common:casting", "//common:memory", "//common:native_type", diff --git a/extensions/protobuf/memory_manager.h b/extensions/protobuf/memory_manager.h index c95189aab..497f537ba 100644 --- a/extensions/protobuf/memory_manager.h +++ b/extensions/protobuf/memory_manager.h @@ -19,7 +19,7 @@ #include "absl/base/attributes.h" #include "absl/base/nullability.h" -#include "base/memory.h" +#include "common/memory.h" #include "google/protobuf/arena.h" namespace cel::extensions { diff --git a/extensions/select_optimization.cc b/extensions/select_optimization.cc index d70403d14..b4a60fb0b 100644 --- a/extensions/select_optimization.cc +++ b/extensions/select_optimization.cc @@ -37,11 +37,11 @@ #include "base/ast_internal/expr.h" #include "base/attribute.h" #include "base/builtins.h" -#include "base/memory.h" #include "base/type.h" #include "base/type_factory.h" #include "base/value_manager.h" #include "common/kind.h" +#include "common/memory.h" #include "common/type.h" #include "common/value.h" #include "eval/compiler/flat_expr_builder_extensions.h" diff --git a/extensions/sets_functions_benchmark_test.cc b/extensions/sets_functions_benchmark_test.cc index af750d5c7..7c53195d3 100644 --- a/extensions/sets_functions_benchmark_test.cc +++ b/extensions/sets_functions_benchmark_test.cc @@ -23,11 +23,11 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/strings/str_replace.h" -#include "base/memory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "eval/internal/interop.h" diff --git a/runtime/BUILD b/runtime/BUILD index c3261fd9d..fd30116c9 100644 --- a/runtime/BUILD +++ b/runtime/BUILD @@ -85,7 +85,7 @@ cc_test( "//base:data", "//base:function", "//base:function_descriptor", - "//base:memory", + "//common:memory", "//common:value", "//internal:status_macros", "//internal:testing", @@ -158,7 +158,7 @@ cc_library( hdrs = ["type_registry.h"], deps = [ "//base:data", - "//base:memory", + "//common:memory", "//common:native_type", "//internal:status_macros", "//runtime/internal:composed_type_provider", @@ -205,7 +205,7 @@ cc_library( hdrs = ["managed_value_factory.h"], deps = [ "//base:data", - "//base:memory", + "//common:memory", "//common:value", ], ) @@ -247,7 +247,7 @@ cc_test( ":runtime_options", ":standard_runtime_builder_factory", "//base:data", - "//base:memory", + "//common:memory", "//common:value", "//extensions:bindings_ext", "//extensions/protobuf:memory_manager", @@ -292,7 +292,7 @@ cc_library( deps = [ ":runtime", ":runtime_builder", - "//base:memory", + "//common:memory", "//common:native_type", "//eval/compiler:constant_folding", "//internal:casts", @@ -336,7 +336,7 @@ cc_library( deps = [ ":runtime", ":runtime_builder", - "//base:memory", + "//common:memory", "//common:native_type", "//eval/compiler:regex_precompilation_optimization", "//internal:casts", diff --git a/runtime/activation_test.cc b/runtime/activation_test.cc index 848030e64..3fbc12ef9 100644 --- a/runtime/activation_test.cc +++ b/runtime/activation_test.cc @@ -22,12 +22,12 @@ #include "base/attribute.h" #include "base/function.h" #include "base/function_descriptor.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "internal/status_macros.h" diff --git a/runtime/constant_folding.cc b/runtime/constant_folding.cc index db0b48f11..b61127d43 100644 --- a/runtime/constant_folding.cc +++ b/runtime/constant_folding.cc @@ -17,7 +17,7 @@ #include "absl/base/macros.h" #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "base/memory.h" +#include "common/memory.h" #include "common/native_type.h" #include "eval/compiler/constant_folding.h" #include "internal/casts.h" diff --git a/runtime/constant_folding.h b/runtime/constant_folding.h index ae7765b98..738666faf 100644 --- a/runtime/constant_folding.h +++ b/runtime/constant_folding.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_CPP_RUNTIME_CONSTANT_FOLDING_H_ #include "absl/status/status.h" -#include "base/memory.h" +#include "common/memory.h" #include "runtime/runtime_builder.h" namespace cel::extensions { diff --git a/runtime/internal/BUILD b/runtime/internal/BUILD index 8383c4658..6e10b5e03 100644 --- a/runtime/internal/BUILD +++ b/runtime/internal/BUILD @@ -37,7 +37,7 @@ cc_library( hdrs = ["mutable_list_impl.h"], deps = [ "//base:data", - "//base:memory", + "//common:memory", "//common:native_type", "//common:type", "//common:value", @@ -51,7 +51,7 @@ cc_test( deps = [ ":mutable_list_impl", "//base:data", - "//base:memory", + "//common:memory", "//common:type", "//common:value", "//internal:testing", diff --git a/runtime/internal/mutable_list_impl.h b/runtime/internal/mutable_list_impl.h index 504c55adc..969c794c8 100644 --- a/runtime/internal/mutable_list_impl.h +++ b/runtime/internal/mutable_list_impl.h @@ -19,7 +19,7 @@ #include -#include "base/memory.h" +#include "common/memory.h" #include "common/type.h" #include "common/value.h" #include "internal/casts.h" diff --git a/runtime/internal/mutable_list_impl_test.cc b/runtime/internal/mutable_list_impl_test.cc index 6a82b6872..468f6a501 100644 --- a/runtime/internal/mutable_list_impl_test.cc +++ b/runtime/internal/mutable_list_impl_test.cc @@ -15,10 +15,10 @@ #include "runtime/internal/mutable_list_impl.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_provider.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/type.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" diff --git a/runtime/managed_value_factory.h b/runtime/managed_value_factory.h index 38884d158..619dbef5e 100644 --- a/runtime/managed_value_factory.h +++ b/runtime/managed_value_factory.h @@ -15,10 +15,10 @@ #ifndef THIRD_PARTY_CEL_CPP_RUNTIME_MANAGED_VALUE_FACTORY_H_ #define THIRD_PARTY_CEL_CPP_RUNTIME_MANAGED_VALUE_FACTORY_H_ -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/type_provider.h" +#include "common/memory.h" #include "common/value_manager.h" #include "common/values/legacy_value_manager.h" diff --git a/runtime/regex_precompilation.h b/runtime/regex_precompilation.h index 5bee36856..6882cdd8c 100644 --- a/runtime/regex_precompilation.h +++ b/runtime/regex_precompilation.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_CPP_REGEX_PRECOMPILATION_FOLDING_H_ #include "absl/status/status.h" -#include "base/memory.h" +#include "common/memory.h" #include "runtime/runtime_builder.h" namespace cel::extensions { diff --git a/runtime/standard_runtime_builder_factory_test.cc b/runtime/standard_runtime_builder_factory_test.cc index 08974ee90..647281797 100644 --- a/runtime/standard_runtime_builder_factory_test.cc +++ b/runtime/standard_runtime_builder_factory_test.cc @@ -25,11 +25,11 @@ #include "absl/algorithm/container.h" #include "absl/base/no_destructor.h" #include "absl/status/status.h" -#include "base/memory.h" #include "base/type_factory.h" #include "base/type_manager.h" #include "base/value.h" #include "base/value_manager.h" +#include "common/memory.h" #include "common/value.h" #include "common/values/legacy_value_manager.h" #include "extensions/bindings_ext.h"