Skip to content

Commit

Permalink
Remove unused flags_ member from Prog class.
Browse files Browse the repository at this point in the history
Change-Id: Ide2d612dde4986efc7089f218a122be2fe287ac2
Reviewed-on: https://code-review.googlesource.com/c/re2/+/55232
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Apr 23, 2020
1 parent 085103c commit 0fadae0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions re2/compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,6 @@ static bool IsAnchorEnd(Regexp** pre, int depth) {

void Compiler::Setup(Regexp::ParseFlags flags, int64_t max_mem,
RE2::Anchor anchor) {
prog_->set_flags(flags);

if (flags & Regexp::Latin1)
encoding_ = kEncodingLatin1;
max_mem_ = max_mem;
Expand All @@ -1111,14 +1109,11 @@ void Compiler::Setup(Regexp::ParseFlags flags, int64_t max_mem,
// on the program.)
if (m >= 1<<24)
m = 1<<24;

// Inst imposes its own limit (currently bigger than 2^24 but be safe).
if (m > Prog::Inst::kMaxInst)
m = Prog::Inst::kMaxInst;

max_ninst_ = static_cast<int>(m);
}

anchor_ = anchor;
}

Expand Down
1 change: 0 additions & 1 deletion re2/prog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ Prog::Prog()
size_(0),
bytemap_range_(0),
first_byte_(-1),
flags_(0),
list_count_(0),
dfa_mem_(0),
dfa_first_(NULL),
Expand Down
3 changes: 0 additions & 3 deletions re2/prog.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ class Prog {
uint16_t* list_heads() { return list_heads_.data(); }
void set_dfa_mem(int64_t dfa_mem) { dfa_mem_ = dfa_mem; }
int64_t dfa_mem() { return dfa_mem_; }
int flags() { return flags_; }
void set_flags(int flags) { flags_ = flags; }
bool anchor_start() { return anchor_start_; }
void set_anchor_start(bool b) { anchor_start_ = b; }
bool anchor_end() { return anchor_end_; }
Expand Down Expand Up @@ -403,7 +401,6 @@ class Prog {
int size_; // number of instructions
int bytemap_range_; // bytemap_[x] < bytemap_range_
int first_byte_; // required first byte for match, or -1 if none
int flags_; // regexp parse flags

int list_count_; // count of lists (see above)
int inst_count_[kNumInst]; // count of instructions by opcode
Expand Down

0 comments on commit 0fadae0

Please sign in to comment.