| Index: sandbox/linux/bpf_dsl/codegen.cc
|
| diff --git a/sandbox/linux/bpf_dsl/codegen.cc b/sandbox/linux/bpf_dsl/codegen.cc
|
| index d88bd531a2f7d26f9e54db52650a0cf047adb243..c78285d1e8f26195c25654d7709d911941d32dda 100644
|
| --- a/sandbox/linux/bpf_dsl/codegen.cc
|
| +++ b/sandbox/linux/bpf_dsl/codegen.cc
|
| @@ -80,7 +80,8 @@ CodeGen::Node CodeGen::AppendInstruction(uint16_t code,
|
| Node jt,
|
| Node jf) {
|
| if (BPF_CLASS(code) == BPF_JMP) {
|
| - CHECK_NE(BPF_JA, BPF_OP(code)) << "CodeGen inserts JAs as needed";
|
| + // CodeGen inserts JAs as needed
|
| + CHECK_NE(BPF_JA, BPF_OP(code));
|
|
|
| // Optimally adding jumps is rather tricky, so we use a quick
|
| // approximation: by artificially reducing |jt|'s range, |jt| will
|
| @@ -90,15 +91,18 @@ CodeGen::Node CodeGen::AppendInstruction(uint16_t code,
|
| return Append(code, k, Offset(jt), Offset(jf));
|
| }
|
|
|
| - CHECK_EQ(kNullNode, jf) << "Non-branch instructions shouldn't provide jf";
|
| + // Non-branch instructions shouldn't provide jf
|
| + CHECK_EQ(kNullNode, jf);
|
| if (BPF_CLASS(code) == BPF_RET) {
|
| - CHECK_EQ(kNullNode, jt) << "Return instructions shouldn't provide jt";
|
| + // Return instructions shouldn't provide jt
|
| + CHECK_EQ(kNullNode, jt);
|
| } else {
|
| // For non-branch/non-return instructions, execution always
|
| // proceeds to the next instruction; so we need to arrange for
|
| // that to be |jt|.
|
| jt = WithinRange(jt, 0);
|
| - CHECK_EQ(0U, Offset(jt)) << "ICE: Failed to setup next instruction";
|
| + // ICE: Failed to setup next instruction
|
| + CHECK_EQ(0U, Offset(jt));
|
| }
|
| return Append(code, k, 0, 0);
|
| }
|
| @@ -140,7 +144,8 @@ CodeGen::Node CodeGen::Append(uint16_t code, uint32_t k, size_t jt, size_t jf) {
|
| }
|
|
|
| size_t CodeGen::Offset(Node target) const {
|
| - CHECK_LT(target, program_.size()) << "Bogus offset target node";
|
| + // Bogus offset target node
|
| + CHECK_LT(target, program_.size());
|
| return (program_.size() - 1) - target;
|
| }
|
|
|
|
|