Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -894,18 +894,11 @@ cc_library(
],
)

cc_library(
name = "reference_count",
hdrs = ["reference_count.h"],
deps = ["//common/internal:reference_count"],
)

cc_library(
name = "allocator",
hdrs = ["allocator.h"],
deps = [
":arena",
":data",
"//internal:new",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
Expand All @@ -927,29 +920,6 @@ cc_test(
],
)

cc_library(
name = "data",
hdrs = ["data.h"],
deps = [
"//common/internal:metadata",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/log:absl_check",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "data_test",
srcs = ["data_test.cc"],
deps = [
":data",
"//common/internal:reference_count",
"//internal:testing",
"@com_google_absl//absl/base:nullability",
"@com_google_protobuf//:protobuf",
],
)

cc_library(
name = "optional_ref",
hdrs = ["optional_ref.h"],
Expand Down
10 changes: 2 additions & 8 deletions common/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "absl/log/die_if_null.h"
#include "absl/numeric/bits.h"
#include "common/arena.h"
#include "common/data.h"
#include "internal/new.h"
#include "google/protobuf/arena.h"

Expand Down Expand Up @@ -291,9 +290,6 @@ class ArenaAllocator<void> {
using U = std::remove_const_t<T>;
U* object;
if constexpr (google::protobuf::Arena::is_arena_constructable<U>::value) {
// Classes derived from `cel::Data` are manually allocated and constructed
// as those class support determining whether the destructor is skippable
// at runtime.
object = google::protobuf::Arena::Create<U>(arena(), std::forward<Args>(args)...);
} else {
if constexpr (ArenaTraits<>::constructible<U>()) {
Expand All @@ -309,8 +305,7 @@ class ArenaAllocator<void> {
}
}
}
if constexpr (google::protobuf::Arena::is_arena_constructable<U>::value ||
std::is_base_of_v<Data, U>) {
if constexpr (google::protobuf::Arena::is_arena_constructable<U>::value) {
ABSL_DCHECK_EQ(object->GetArena(), arena());
}
return object;
Expand All @@ -322,8 +317,7 @@ class ArenaAllocator<void> {
void delete_object(T* p) noexcept {
using U = std::remove_const_t<T>;
ABSL_DCHECK(p != nullptr);
if constexpr (google::protobuf::Arena::is_arena_constructable<U>::value ||
std::is_base_of_v<Data, U>) {
if constexpr (google::protobuf::Arena::is_arena_constructable<U>::value) {
ABSL_DCHECK_EQ(p->GetArena(), arena());
}
}
Expand Down
120 changes: 0 additions & 120 deletions common/data.h

This file was deleted.

67 changes: 0 additions & 67 deletions common/data_test.cc

This file was deleted.

34 changes: 0 additions & 34 deletions common/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,6 @@ cc_library(
],
)

cc_library(
name = "reference_count",
srcs = ["reference_count.cc"],
hdrs = ["reference_count.h"],
deps = [
"//common:data",
"//internal:new",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/strings:string_view",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "reference_count_test",
srcs = ["reference_count_test.cc"],
deps = [
":reference_count",
"//common:data",
"//internal:testing",
"@com_google_absl//absl/base:nullability",
"@com_google_protobuf//:protobuf",
"@com_google_protobuf//:struct_cc_proto",
],
)

cc_library(
name = "metadata",
hdrs = ["metadata.h"],
deps = ["@com_google_protobuf//:protobuf"],
)

cc_library(
name = "byte_string",
srcs = ["byte_string.cc"],
Expand Down
41 changes: 0 additions & 41 deletions common/internal/metadata.h

This file was deleted.

Loading
Loading