Skip to content

Commit

Permalink
ArenaConstant
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 667603140
  • Loading branch information
jcking authored and copybara-github committed Aug 26, 2024
1 parent b82f1a1 commit 01b3935
Show file tree
Hide file tree
Showing 19 changed files with 2,441 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")
def base_deps():
"""Base evaluator and test dependencies."""

# Abseil LTS 20240116.2
ABSL_SHA1 = "d7aaad83b488fd62bd51c81ecf16cd938532cc0a"
ABSL_SHA256 = "68e7d36d621769ab500b2ebeec6a7910420566874b4b33b340a04bd70e67fe43"
# Abseil LTS 20240722.0
ABSL_SHA1 = "4447c7562e3bc702ade25105912dce503f0c4010"
ABSL_SHA256 = "d8342ad77aa9e16103c486b615460c24a695a1f04cdb760eb02fef780df99759"
http_archive(
name = "com_google_absl",
urls = ["https://github.com/abseil/abseil-cpp/archive/" + ABSL_SHA1 + ".zip"],
strip_prefix = "abseil-cpp-" + ABSL_SHA1,
sha256 = ABSL_SHA256,
)

# v1.14.0
GOOGLETEST_SHA1 = "f8d7d77c06936315286eb55f8de22cd23c188571"
GOOGLETEST_SHA256 = "b976cf4fd57b318afdb1bdb27fc708904b3e4bed482859eb94ba2b4bdd077fe2"
# v1.15.2
GOOGLETEST_SHA1 = "b514bdc898e2951020cbdca1304b75f5950d1f59"
GOOGLETEST_SHA256 = "8c0ceafa3ea24bf78e3519b7846d99e76c45899aa4dac4d64e7dd62e495de9fd"
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/" + GOOGLETEST_SHA1 + ".zip"],
Expand Down
217 changes: 217 additions & 0 deletions common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -904,3 +904,220 @@ cc_library(
"@com_google_absl//absl/utility",
],
)

cc_library(
name = "arena_string",
hdrs = ["arena_string.h"],
deps = [
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/strings:string_view",
],
)

cc_test(
name = "arena_string_test",
srcs = ["arena_string_test.cc"],
deps = [
":arena_string",
"//internal:testing",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/strings:string_view",
],
)

cc_library(
name = "arena_string_pool",
hdrs = ["arena_string_pool.h"],
deps = [
":arena_string",
"//internal:string_pool",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/strings:string_view",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "arena_string_pool_test",
srcs = ["arena_string_pool_test.cc"],
deps = [
":arena_string_pool",
"//internal:testing",
"@com_google_protobuf//:protobuf",
],
)

cc_library(
name = "arena_bytes",
hdrs = ["arena_bytes.h"],
deps = [
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/strings:string_view",
],
)

cc_test(
name = "arena_bytes_test",
srcs = ["arena_bytes_test.cc"],
deps = [
":arena_bytes",
"//internal:testing",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/strings:string_view",
],
)

cc_library(
name = "arena_bytes_pool",
hdrs = ["arena_bytes_pool.h"],
deps = [
":arena_bytes",
"//internal:string_pool",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/strings:string_view",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "arena_bytes_pool_test",
srcs = ["arena_bytes_pool_test.cc"],
deps = [
":arena_bytes_pool",
"//internal:testing",
"@com_google_protobuf//:protobuf",
],
)

cc_library(
name = "arena_constant",
srcs = ["arena_constant.cc"],
hdrs = ["arena_constant.h"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_string",
":arena_string_pool",
":constant",
"//internal:time",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/functional:overload",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:variant",
"@com_google_absl//absl/utility",
],
)

cc_test(
name = "arena_constant_test",
srcs = ["arena_constant_test.cc"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_constant",
":arena_string",
":arena_string_pool",
":constant",
"//internal:testing",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:variant",
"@com_google_protobuf//:protobuf",
],
)

cc_library(
name = "arena_constant_proto",
srcs = ["arena_constant_proto.cc"],
hdrs = ["arena_constant_proto.h"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_constant",
":arena_string",
":arena_string_pool",
"//internal:proto_time_encoding",
"//internal:status_macros",
"//internal:time",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "arena_constant_proto_test",
srcs = ["arena_constant_proto_test.cc"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_constant",
":arena_constant_proto",
":arena_string",
":arena_string_pool",
"//internal:testing",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_library(
name = "arena_constant_proto_v1alpha1",
srcs = ["arena_constant_proto_v1alpha1.cc"],
hdrs = ["arena_constant_proto_v1alpha1.h"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_constant",
":arena_string",
":arena_string_pool",
"//internal:proto_time_encoding",
"//internal:status_macros",
"//internal:time",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "arena_constant_proto_v1alpha1_test",
srcs = ["arena_constant_proto_v1alpha1_test.cc"],
deps = [
":arena_bytes",
":arena_bytes_pool",
":arena_constant",
":arena_constant_proto_v1alpha1",
":arena_string",
":arena_string_pool",
"//internal:testing",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_protobuf//:protobuf",
],
)
Loading

0 comments on commit 01b3935

Please sign in to comment.