| Index: sandbox/linux/bpf_dsl/bpf_dsl_impl.h
|
| diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_impl.h b/sandbox/linux/bpf_dsl/bpf_dsl_impl.h
|
| index 709a31c5da3cd88ea79a27b5a0fe6a4a5344cc1a..0064f8a7a2176f7c97e8b4fff02d3fec27067dd2 100644
|
| --- a/sandbox/linux/bpf_dsl/bpf_dsl_impl.h
|
| +++ b/sandbox/linux/bpf_dsl/bpf_dsl_impl.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "sandbox/linux/bpf_dsl/codegen.h"
|
| #include "sandbox/sandbox_export.h"
|
|
|
| namespace sandbox {
|
| @@ -19,12 +20,12 @@ namespace internal {
|
| // Internal interface implemented by BoolExpr implementations.
|
| class BoolExprImpl : public base::RefCounted<BoolExprImpl> {
|
| public:
|
| - // Compile uses |pc| to construct an ErrorCode that conditionally continues
|
| - // to either |true_ec| or |false_ec|, depending on whether the represented
|
| + // Compile uses |pc| to emit a CodeGen::Node that conditionally continues
|
| + // to either |then_node| or |false_node|, depending on whether the represented
|
| // boolean expression is true or false.
|
| - virtual ErrorCode Compile(PolicyCompiler* pc,
|
| - ErrorCode true_ec,
|
| - ErrorCode false_ec) const = 0;
|
| + virtual CodeGen::Node Compile(PolicyCompiler* pc,
|
| + CodeGen::Node then_node,
|
| + CodeGen::Node else_node) const = 0;
|
|
|
| protected:
|
| BoolExprImpl() {}
|
| @@ -38,9 +39,9 @@ class BoolExprImpl : public base::RefCounted<BoolExprImpl> {
|
| // Internal interface implemented by ResultExpr implementations.
|
| class ResultExprImpl : public base::RefCounted<ResultExprImpl> {
|
| public:
|
| - // Compile uses |pc| to construct an ErrorCode analogous to the represented
|
| - // result expression.
|
| - virtual ErrorCode Compile(PolicyCompiler* pc) const = 0;
|
| + // Compile uses |pc| to emit a CodeGen::Node that executes the
|
| + // represented result expression.
|
| + virtual CodeGen::Node Compile(PolicyCompiler* pc) const = 0;
|
|
|
| // HasUnsafeTraps returns whether the result expression is or recursively
|
| // contains an unsafe trap expression.
|
|
|