Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Internal change #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 111 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
3638cd2
Add CEL/C++ support for hermetic descriptor pools
timn Feb 10, 2022
be6479a
Allow registration of non-strict functions
Feb 10, 2022
9207f71
Internal change
jcking Feb 11, 2022
589145f
Internal change.
TristonianJones Feb 14, 2022
c5bbf19
Internal change.
TristonianJones Feb 14, 2022
c0ad193
Internal change
jcking Feb 14, 2022
7fef2dd
Add allocation focused benchmarks.
Feb 15, 2022
dd133a9
Add overloads for cel error factories to use the cel::MemoryManager i…
Feb 17, 2022
720f5bd
Internal change
jcking Feb 17, 2022
3392c96
Move internal usages of proto2::arena to cel::MemoryManager where pos…
Feb 23, 2022
12f334f
Expose CelMapBuilder class so it works better with memory manager abs…
Mar 2, 2022
9c3d2cf
Internal change
jcking Mar 2, 2022
585c96f
Internal change
jcking Mar 2, 2022
f851cc2
Internal change
jcking Mar 4, 2022
760b424
Add cel_number.h with utilities for cross numeric comparisons. Use it…
Mar 4, 2022
84b2760
Internal change
jcking Mar 8, 2022
6159380
Update cel_number.h with utilities for cross numeric conversions for …
Mar 8, 2022
143ce22
Add support for cross numeric lookups in CEL C++ evaluator.
Mar 9, 2022
97cec88
Internal change
jcking Mar 9, 2022
d053fa2
Internal change
jcking Mar 9, 2022
470e7ba
Update heterogeneous equality behavior to return false for mixed types.
Mar 9, 2022
202148f
Add utility function to get file descriptor set of standard messages
timn Mar 10, 2022
afc86aa
Ignore json_name on DescriptorProto comparison for pools
timn Mar 10, 2022
9e21e13
Internal change
jcking Mar 10, 2022
36f0a84
Internal change
jcking Mar 14, 2022
0398fa8
Introduce type provider API and LegacyTypeAdapter with similar functi…
Mar 16, 2022
a3df559
Internal change
jcking Mar 17, 2022
f4dd008
Add TypeProvider implementation for creation APIs for protocol buffer…
Mar 18, 2022
96fb8dc
Internal change
jcking Mar 18, 2022
b194726
internal change
Mar 18, 2022
ba76d68
Internal change
jcking Mar 18, 2022
7e19b96
Edge case fixes for heterogeneous equality
TristonianJones Mar 21, 2022
63f9d59
Edge case fixes for heterogeneous equality
TristonianJones Mar 21, 2022
26e4e57
Edge case fixes for heterogeneous equality
TristonianJones Mar 21, 2022
3dd2e36
Internal sync
TristonianJones Mar 22, 2022
2fd4dbc
Internal change
jcking Mar 22, 2022
a14bf92
Update CEL C++ interpreter to consult registered type providers befor…
Mar 24, 2022
43cc3a1
Internal change
jcking Mar 24, 2022
c3fa7b2
Internal change
jcking Mar 24, 2022
a45ff18
Add a gunit matcher for CelList.
Mar 25, 2022
1ebb79c
Internal change
jcking Mar 25, 2022
c26c28b
Internal change
jcking Mar 25, 2022
ae678df
Refactors: Remove direct references to descriptor pool and message fa…
Mar 25, 2022
3e50dcd
Internal change
jcking Mar 25, 2022
b06fa1c
Internal change
jcking Mar 28, 2022
2e2ea38
Internal change
jcking Mar 28, 2022
0bbc897
Sync from GitHub
TristonianJones Mar 28, 2022
b8c0912
Add accessor APIs to legacy type adapter.
Mar 28, 2022
a814dc6
Update internal value representation to use MessageLite (with optiona…
Mar 29, 2022
7b66af4
Make protobuf type provider thread-compatible.
Mar 29, 2022
4e9a250
Internal change
jcking Mar 30, 2022
f94ff29
Make map lookup error actually say which key wasn't found.
Apr 1, 2022
0f50752
Make map lookup error actually say which key wasn't found.
TristonianJones Apr 1, 2022
8e0e91b
Seperate proto-specific function adapter code from core implementatio…
Apr 1, 2022
df1e2cf
Unnest legacy adapter interfaces.
Apr 4, 2022
02a47ea
Introduce TypeInfo apis (indirection to resolve cyclic dependency bet…
Apr 5, 2022
f629fc3
Mark tests as opt-out or opt-in for heterogeneous equality
TristonianJones Apr 6, 2022
bf7da91
Remove usage of CelValue.DebugString() from CEL error messages.
TristonianJones Apr 6, 2022
076a06f
Add basic benchmark for deeply nested field accesses.
Apr 8, 2022
fee8517
Add simple benchmarks for proto list and struct accesses.
Apr 8, 2022
d1bd642
Internal change
jcking Apr 8, 2022
221541b
Branch MessageWrapper library to help resolve cyclic dependencies.
Apr 12, 2022
5c4082a
Update cel message value factory to use internal wrap / unwrap primit…
Apr 12, 2022
b36f63a
Add support for namespaced function resolution for ParsedExpressions.
Apr 13, 2022
667279c
Branch field access implementation to remove direct dependency on Cel…
Apr 13, 2022
2e12dd4
Migrate public field access helpers to use branched internal implemen…
Apr 13, 2022
5d2b8ef
Refactor FieldBackedListImpl to remove required build dependency on C…
Apr 13, 2022
7100bdc
Migrate FieldBackedMap off of hard dependency on CelProtoWrapper to h…
Apr 13, 2022
6a2eaa3
Update internal factory using definition to be a function ptr instead…
Apr 13, 2022
06045a1
Update legacy type APIs to operate on the message wrapper type instea…
Apr 13, 2022
be9830b
Move wrapper type unboxing to a parameter on the GetField API
Apr 13, 2022
532df2c
Internal change
jcking Apr 14, 2022
175a8ab
Internal change
jcking Apr 14, 2022
d6276a7
Internal change
jcking Apr 15, 2022
05e0549
Introduce duck-typed message adapter. This defers to the descriptor o…
Apr 16, 2022
b20d23b
Split internal library for encoding / decoding time from other proto-…
Apr 18, 2022
d13b104
Wire TypeInfoApis into CelValue::MessageWrapper. Not used anywhere ye…
Apr 18, 2022
af70f58
Update CelValue to provide full typename and debug string via type in…
Apr 19, 2022
eb2dd10
Update select step to delegate to type_info instead of calling reflec…
Apr 19, 2022
52dd139
Add equality test to legacy type access apis.
Apr 19, 2022
c912af2
Add IsEqualTo Implementation to proto message type adapter.
Apr 19, 2022
1a5c946
Update C++ CEL interpreter == implementation to use the type defined …
Apr 19, 2022
c43bbc7
Introduce PortableCelExpressionBuilder.
Apr 20, 2022
a12cac6
Internal change
jcking Apr 20, 2022
64a3b90
Make map lookup error actually say which key wasn't found.
Apr 20, 2022
60b68e8
Make use of reflection APIs for CelTypeRegistry loading core enums op…
Apr 28, 2022
175a10c
Ensure that list and map equality account for identity equality effic…
TristonianJones Apr 28, 2022
6e957ec
Add native types alternatives for the current proto type representati…
May 2, 2022
0f80c89
Internal change.
jcking May 3, 2022
3c8ef7a
Internal change.
jcking May 3, 2022
a5774cc
Update portable expr builder test to build with lite proto, using an …
May 3, 2022
f382a37
Update type registry to lookup CelType values using the registered ty…
May 3, 2022
17eba2d
Expose MessageWrapper type in a publicly visible rule.
May 3, 2022
00435fc
Introduce MessageWrapper::Builder abstraction to manage message creat…
May 3, 2022
14df906
Add portable version of the function adapter helper. This version doe…
May 3, 2022
119cb43
Consolidate flat expr builder setup into the portable implementation.
May 4, 2022
201937b
Update builtin function registrar to use portable version of cel func…
May 4, 2022
b078a78
Remove `CreateUnknownValueError` and `IsUnknownValueError`
jcking May 6, 2022
61815be
Remove more deprecated and unreferenced functions
jcking May 11, 2022
bb8475c
Remove references to `CelValue` from `CelAttributeQualifier`
jcking May 12, 2022
99b54d4
Remove references to `CelValue` from `CelAttributeQualifier`
jcking May 12, 2022
813c83f
Internal change
jcking May 19, 2022
345f12f
Internal change
jcking May 20, 2022
2929d2b
Internal change
jcking May 24, 2022
95d4b2d
Bring native types closer to protos. Do not assert on mutable_*() cal…
May 26, 2022
21db34f
Internal change.
jcking May 28, 2022
23cd804
Add conversion utilities going from the proto type representations to…
May 31, 2022
ac2f3b2
OSS export.
kyessenov Jun 6, 2022
69f4f56
Internal change
jcking Jun 6, 2022
71c1034
Default enable heterogeneous equality.
TristonianJones Jun 6, 2022
7edd227
GCC fixes.
kyessenov Jun 6, 2022
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
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build --cxxopt=-std=c++17
build --cxxopt=-fsized-deallocation

# Enable matchers in googletest
build --define absl=1
Expand Down
277 changes: 277 additions & 0 deletions base/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
# Copyright 2021 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.

package(
# Under active development, not yet being released.
default_visibility = ["//visibility:public"],
)

licenses(["notice"])

cc_library(
name = "handle",
hdrs = ["handle.h"],
deps = [
"//base/internal:handle",
"//internal:casts",
"@com_google_absl//absl/base:core_headers",
],
)

cc_library(
name = "kind",
srcs = ["kind.cc"],
hdrs = ["kind.h"],
deps = [
"@com_google_absl//absl/strings",
],
)

cc_test(
name = "kind_test",
srcs = ["kind_test.cc"],
deps = [
":kind",
"//internal:testing",
],
)

cc_library(
name = "memory_manager",
srcs = ["memory_manager.cc"],
hdrs = ["memory_manager.h"],
deps = [
"//base/internal:memory_manager",
"//internal:no_destructor",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:dynamic_annotations",
"@com_google_absl//absl/numeric:bits",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:optional",
],
)

cc_test(
name = "memory_manager_test",
srcs = ["memory_manager_test.cc"],
deps = [
":memory_manager",
"//internal:testing",
],
)

cc_library(
name = "operators",
srcs = ["operators.cc"],
hdrs = ["operators.h"],
deps = [
"//base/internal:operators",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
],
)

cc_test(
name = "operators_test",
srcs = ["operators_test.cc"],
deps = [
":operators",
"//internal:testing",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
],
)

cc_library(
name = "type",
srcs = [
"type.cc",
"type_factory.cc",
"type_manager.cc",
"type_provider.cc",
],
hdrs = [
"type.h",
"type_factory.h",
"type_manager.h",
"type_provider.h",
"type_registry.h",
],
deps = [
":handle",
":kind",
":memory_manager",
"//base/internal:type",
"//internal:casts",
"//internal:no_destructor",
"//internal:rtti",
"//internal:status_macros",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "type_test",
srcs = [
"type_factory_test.cc",
"type_test.cc",
],
deps = [
":handle",
":memory_manager",
":type",
":value",
"//base/internal:memory_manager_testing",
"//internal:testing",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
],
)

cc_library(
name = "value",
srcs = [
"value.cc",
"value_factory.cc",
],
hdrs = [
"value.h",
"value_factory.h",
],
deps = [
":handle",
":kind",
":memory_manager",
":type",
"//base/internal:value",
"//internal:casts",
"//internal:no_destructor",
"//internal:rtti",
"//internal:status_macros",
"//internal:strings",
"//internal:time",
"//internal:utf8",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "value_test",
srcs = [
"value_factory_test.cc",
"value_test.cc",
],
deps = [
":memory_manager",
":type",
":value",
"//base/internal:memory_manager_testing",
"//internal:strings",
"//internal:testing",
"//internal:time",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
],
)

cc_library(
name = "ast",
hdrs = [
"ast.h",
],
deps = [
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "ast_test",
srcs = [
"ast_test.cc",
],
deps = [
":ast",
"//internal:testing",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/types:variant",
],
)

cc_library(
name = "ast_utility",
srcs = ["ast_utility.cc"],
hdrs = ["ast_utility.h"],
deps = [
":ast",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/time",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "ast_utility_test",
srcs = [
"ast_utility_test.cc",
],
deps = [
":ast",
":ast_utility",
"//internal:testing",
"@com_google_absl//absl/status",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:variant",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)
Loading