/proc/self/cwd/eval/eval/compiler_constant_step.cc
Line | Count | Source |
1 | | // Copyright 2023 Google LLC |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
6 | | // |
7 | | // https://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software |
10 | | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | // See the License for the specific language governing permissions and |
13 | | // limitations under the License. |
14 | | #include "eval/eval/compiler_constant_step.h" |
15 | | |
16 | | #include "absl/status/status.h" |
17 | | #include "common/value.h" |
18 | | #include "eval/eval/attribute_trail.h" |
19 | | #include "eval/eval/evaluator_core.h" |
20 | | |
21 | | namespace google::api::expr::runtime { |
22 | | |
23 | | using ::cel::Value; |
24 | | |
25 | | absl::Status DirectCompilerConstantStep::Evaluate( |
26 | 0 | ExecutionFrameBase& frame, Value& result, AttributeTrail& attribute) const { |
27 | 0 | result = value_; |
28 | 0 | return absl::OkStatus(); |
29 | 0 | } |
30 | | |
31 | 4.57M | absl::Status CompilerConstantStep::Evaluate(ExecutionFrame* frame) const { |
32 | 4.57M | frame->value_stack().Push(value_); |
33 | | |
34 | 4.57M | return absl::OkStatus(); |
35 | 4.57M | } |
36 | | |
37 | | } // namespace google::api::expr::runtime |