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

Unified Diff: src/jsregexp.h

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 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 | « src/json-parser.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.h
diff --git a/src/jsregexp.h b/src/jsregexp.h
index 4b84c9558d975b6ccc9b0bace627bbee791c5797..419fd7b8cc449e5f9c0269444ed92145ac4f61fc 100644
--- a/src/jsregexp.h
+++ b/src/jsregexp.h
@@ -263,8 +263,8 @@ class CharacterRange {
bool is_valid() { return from_ <= to_; }
bool IsEverything(uc16 max) { return from_ == 0 && to_ >= max; }
bool IsSingleton() { return (from_ == to_); }
- void AddCaseEquivalents(ZoneList<CharacterRange>* ranges, bool is_one_byte,
- Zone* zone);
+ void AddCaseEquivalents(Isolate* isolate, Zone* zone,
+ ZoneList<CharacterRange>* ranges, bool is_one_byte);
static void Split(ZoneList<CharacterRange>* base,
Vector<const int> overlay,
ZoneList<CharacterRange>** included,
@@ -847,7 +847,7 @@ class TextNode: public SeqRegExpNode {
int characters_filled_in,
bool not_at_start);
ZoneList<TextElement>* elements() { return elms_; }
- void MakeCaseIndependent(bool is_one_byte);
+ void MakeCaseIndependent(Isolate* isolate, bool is_one_byte);
virtual int GreedyLoopTextLength();
virtual RegExpNode* GetSuccessorOfOmnivorousTextNode(
RegExpCompiler* compiler);
@@ -1598,8 +1598,9 @@ FOR_EACH_NODE_TYPE(DECLARE_VISIT)
// +-------+ +------------+
class Analysis: public NodeVisitor {
public:
- Analysis(bool ignore_case, bool is_one_byte)
- : ignore_case_(ignore_case),
+ Analysis(Isolate* isolate, bool ignore_case, bool is_one_byte)
+ : isolate_(isolate),
+ ignore_case_(ignore_case),
is_one_byte_(is_one_byte),
error_message_(NULL) {}
void EnsureAnalyzed(RegExpNode* node);
@@ -1619,7 +1620,10 @@ FOR_EACH_NODE_TYPE(DECLARE_VISIT)
error_message_ = error_message;
}
+ Isolate* isolate() const { return isolate_; }
+
private:
+ Isolate* isolate_;
bool ignore_case_;
bool is_one_byte_;
const char* error_message_;
@@ -1652,19 +1656,18 @@ class RegExpEngine: public AllStatic {
code(isolate->heap()->the_hole_value()),
num_registers(0) {}
CompilationResult(Object* code, int registers)
- : error_message(NULL),
- code(code),
- num_registers(registers) {}
+ : error_message(NULL), code(code), num_registers(registers) {}
const char* error_message;
Object* code;
int num_registers;
};
- static CompilationResult Compile(RegExpCompileData* input, bool ignore_case,
+ static CompilationResult Compile(Isolate* isolate, Zone* zone,
+ RegExpCompileData* input, bool ignore_case,
bool global, bool multiline, bool sticky,
Handle<String> pattern,
Handle<String> sample_subject,
- bool is_one_byte, Zone* zone);
+ bool is_one_byte);
static bool TooMuchRegExpCode(Handle<String> pattern);
« no previous file with comments | « src/json-parser.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698