| Index: src/regexp/jsregexp.h
|
| diff --git a/src/regexp/jsregexp.h b/src/regexp/jsregexp.h
|
| index 5f59a82a710743ae4f34aba8d17f133cd0d5c65c..1d152dcfb2536e1a7c5f65a33d5b468787fea8d1 100644
|
| --- a/src/regexp/jsregexp.h
|
| +++ b/src/regexp/jsregexp.h
|
| @@ -529,7 +529,7 @@ class RegExpNode: public ZoneObject {
|
| // the number of nodes we are willing to look at in order to create this data.
|
| static const int kRecursionBudget = 200;
|
| bool KeepRecursing(RegExpCompiler* compiler);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start) {
|
| UNREACHABLE();
|
| }
|
| @@ -537,7 +537,7 @@ class RegExpNode: public ZoneObject {
|
| // If we know that the input is one-byte then there are some nodes that can
|
| // never match. This method returns a node that can be substituted for
|
| // itself, or NULL if the node can never match.
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler) {
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case) {
|
| return this;
|
| }
|
| // Helper for FilterOneByte.
|
| @@ -611,15 +611,15 @@ class SeqRegExpNode: public RegExpNode {
|
| : RegExpNode(on_success->zone()), on_success_(on_success) { }
|
| RegExpNode* on_success() { return on_success_; }
|
| void set_on_success(RegExpNode* node) { on_success_ = node; }
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start) {
|
| - on_success_->FillInBMInfo(compiler, offset, budget - 1, bm, not_at_start);
|
| + on_success_->FillInBMInfo(isolate, offset, budget - 1, bm, not_at_start);
|
| if (offset == 0) set_bm_info(not_at_start, bm);
|
| }
|
|
|
| protected:
|
| - RegExpNode* FilterSuccessor(int depth, RegExpCompiler* compiler);
|
| + RegExpNode* FilterSuccessor(int depth, bool ignore_case);
|
|
|
| private:
|
| RegExpNode* on_success_;
|
| @@ -665,7 +665,7 @@ class ActionNode: public SeqRegExpNode {
|
| return on_success()->GetQuickCheckDetails(
|
| details, compiler, filled_in, not_at_start);
|
| }
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
| ActionType action_type() { return action_type_; }
|
| // TODO(erikcorry): We should allow some action nodes in greedy loops.
|
| @@ -744,10 +744,10 @@ class TextNode: public SeqRegExpNode {
|
| virtual int GreedyLoopTextLength();
|
| virtual RegExpNode* GetSuccessorOfOmnivorousTextNode(
|
| RegExpCompiler* compiler);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
| void CalculateOffsets();
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
|
|
|
| private:
|
| enum TextEmitPassType {
|
| @@ -803,7 +803,7 @@ class AssertionNode: public SeqRegExpNode {
|
| RegExpCompiler* compiler,
|
| int filled_in,
|
| bool not_at_start);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
| AssertionType assertion_type() { return assertion_type_; }
|
|
|
| @@ -841,7 +841,7 @@ class BackReferenceNode: public SeqRegExpNode {
|
| bool not_at_start) {
|
| return;
|
| }
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
|
|
| private:
|
| @@ -867,7 +867,7 @@ class EndNode: public RegExpNode {
|
| // Returning 0 from EatsAtLeast should ensure we never get here.
|
| UNREACHABLE();
|
| }
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start) {
|
| // Returning 0 from EatsAtLeast should ensure we never get here.
|
| UNREACHABLE();
|
| @@ -960,7 +960,7 @@ class ChoiceNode: public RegExpNode {
|
| RegExpCompiler* compiler,
|
| int characters_filled_in,
|
| bool not_at_start);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
|
|
| bool being_calculated() { return being_calculated_; }
|
| @@ -970,7 +970,7 @@ class ChoiceNode: public RegExpNode {
|
| virtual bool try_to_emit_quick_check_for_alternative(bool is_first) {
|
| return true;
|
| }
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
|
| virtual bool read_backward() { return false; }
|
|
|
| protected:
|
| @@ -1028,9 +1028,9 @@ class NegativeLookaroundChoiceNode : public ChoiceNode {
|
| RegExpCompiler* compiler,
|
| int characters_filled_in,
|
| bool not_at_start);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start) {
|
| - alternatives_->at(1).node()->FillInBMInfo(compiler, offset, budget - 1, bm,
|
| + alternatives_->at(1).node()->FillInBMInfo(isolate, offset, budget - 1, bm,
|
| not_at_start);
|
| if (offset == 0) set_bm_info(not_at_start, bm);
|
| }
|
| @@ -1042,7 +1042,7 @@ class NegativeLookaroundChoiceNode : public ChoiceNode {
|
| virtual bool try_to_emit_quick_check_for_alternative(bool is_first) {
|
| return !is_first;
|
| }
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
|
| };
|
|
|
|
|
| @@ -1062,14 +1062,14 @@ class LoopChoiceNode: public ChoiceNode {
|
| RegExpCompiler* compiler,
|
| int characters_filled_in,
|
| bool not_at_start);
|
| - virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
|
| + virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
|
| BoyerMooreLookahead* bm, bool not_at_start);
|
| RegExpNode* loop_node() { return loop_node_; }
|
| RegExpNode* continue_node() { return continue_node_; }
|
| bool body_can_be_zero_length() { return body_can_be_zero_length_; }
|
| virtual bool read_backward() { return read_backward_; }
|
| virtual void Accept(NodeVisitor* visitor);
|
| - virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
|
| + virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
|
|
|
| private:
|
| // AddAlternative is made private for loop nodes because alternatives
|
|
|