Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(998)

Unified Diff: src/regexp/jsregexp.h

Issue 1641613002: [regexp] implement /ui to mirror the implementation for /i. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/jsregexp.h
diff --git a/src/regexp/jsregexp.h b/src/regexp/jsregexp.h
index 1d152dcfb2536e1a7c5f65a33d5b468787fea8d1..5f59a82a710743ae4f34aba8d17f133cd0d5c65c 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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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, bool ignore_case) {
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler) {
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, bool ignore_case);
- virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
+ virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
BoyerMooreLookahead* bm, bool not_at_start) {
- on_success_->FillInBMInfo(isolate, offset, budget - 1, bm, not_at_start);
+ on_success_->FillInBMInfo(compiler, offset, budget - 1, bm, not_at_start);
if (offset == 0) set_bm_info(not_at_start, bm);
}
protected:
- RegExpNode* FilterSuccessor(int depth, bool ignore_case);
+ RegExpNode* FilterSuccessor(int depth, RegExpCompiler* compiler);
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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
BoyerMooreLookahead* bm, bool not_at_start);
void CalculateOffsets();
- virtual RegExpNode* FilterOneByte(int depth, bool ignore_case);
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
private:
enum TextEmitPassType {
@@ -803,7 +803,7 @@ class AssertionNode: public SeqRegExpNode {
RegExpCompiler* compiler,
int filled_in,
bool not_at_start);
- virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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, bool ignore_case);
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
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(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, int offset, int budget,
BoyerMooreLookahead* bm, bool not_at_start) {
- alternatives_->at(1).node()->FillInBMInfo(isolate, offset, budget - 1, bm,
+ alternatives_->at(1).node()->FillInBMInfo(compiler, 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, bool ignore_case);
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
};
@@ -1062,14 +1062,14 @@ class LoopChoiceNode: public ChoiceNode {
RegExpCompiler* compiler,
int characters_filled_in,
bool not_at_start);
- virtual void FillInBMInfo(Isolate* isolate, int offset, int budget,
+ virtual void FillInBMInfo(RegExpCompiler* compiler, 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, bool ignore_case);
+ virtual RegExpNode* FilterOneByte(int depth, RegExpCompiler* compiler);
private:
// AddAlternative is made private for loop nodes because alternatives
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698