Skip to content

Commit

Permalink
upb: replumb upb_Arena to be substantially more opaque
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 592345066
  • Loading branch information
ericsalo authored and copybara-github committed Dec 19, 2023
1 parent b9ad33c commit e3ed591
Show file tree
Hide file tree
Showing 9 changed files with 278 additions and 229 deletions.
9 changes: 0 additions & 9 deletions upb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,6 @@ alias(
visibility = ["//visibility:public"],
)

alias(
name = "mem_internal",
actual = "//upb/mem:internal",
visibility = ["//visibility:public"],
)

alias(
name = "message",
actual = "//upb/message",
Expand Down Expand Up @@ -403,7 +397,6 @@ upb_amalgamation(
":hash",
":lex",
":mem",
":mem_internal",
":message",
":message_accessors",
":message_copy",
Expand Down Expand Up @@ -454,7 +447,6 @@ upb_amalgamation(
":json",
":lex",
":mem",
":mem_internal",
":message",
":message_accessors",
":message_copy",
Expand Down Expand Up @@ -505,7 +497,6 @@ upb_amalgamation(
":json",
":lex",
":mem",
":mem_internal",
":message",
":message_accessors",
":message_copy",
Expand Down
25 changes: 5 additions & 20 deletions upb/mem/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,18 @@ load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")

cc_library(
name = "mem",
hdrs = [
"alloc.h",
"arena.h",
"arena.hpp",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
":internal",
"//upb:port",
],
)

cc_library(
name = "internal",
srcs = [
"alloc.c",
"alloc.h",
"arena.c",
"arena.h",
],
hdrs = [
"alloc.h",
"arena.h",
"arena.hpp",
"internal/arena.h",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//upb:__pkg__"],
visibility = ["//visibility:public"],
deps = [
"//upb:port",
],
Expand All @@ -44,9 +30,8 @@ cc_test(
name = "arena_test",
srcs = ["arena_test.cc"],
deps = [
":mem",
"@com_google_googletest//:gtest_main",
"//upb:mem",
"//upb:mem_internal",
"//upb:port",
"@com_google_absl//absl/random",
"@com_google_absl//absl/random:distributions",
Expand Down
Loading

0 comments on commit e3ed591

Please sign in to comment.