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

Unified Diff: src/jsregexp.h

Issue 1082763002: Reduce regexp compiler stack size when not optimizing regexps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More recursion limiting. Created 5 years, 8 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/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 0b4f39dc494db4ae25a7e2391f529afb785f2db8..227e304e2d59e69840ec698f4c6f737b949fafb5 100644
--- a/src/jsregexp.h
+++ b/src/jsregexp.h
@@ -570,7 +570,7 @@ extern int kUninitializedRegExpNodePlaceHolder;
class RegExpNode: public ZoneObject {
public:
explicit RegExpNode(Zone* zone)
- : replacement_(NULL), trace_count_(0), zone_(zone) {
+ : replacement_(NULL), on_work_list_(false), trace_count_(0), zone_(zone) {
bm_info_[0] = bm_info_[1] = NULL;
}
virtual ~RegExpNode();
@@ -618,6 +618,7 @@ class RegExpNode: public ZoneObject {
// EatsAtLeast, GetQuickCheckDetails. The budget argument is used to limit
// 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(int offset,
int budget,
BoyerMooreLookahead* bm,
@@ -658,6 +659,9 @@ class RegExpNode: public ZoneObject {
// the deferred actions in the current trace and generating a goto.
static const int kMaxCopiesCodeGenerated = 10;
+ bool on_work_list() { return on_work_list_; }
+ void set_on_work_list(bool value) { on_work_list_ = value; }
+
NodeInfo* info() { return &info_; }
BoyerMooreLookahead* bm_info(bool not_at_start) {
@@ -679,6 +683,7 @@ class RegExpNode: public ZoneObject {
private:
static const int kFirstCharBudget = 10;
Label label_;
+ bool on_work_list_;
NodeInfo info_;
// This variable keeps track of how many times code has been generated for
// this node (in different traces). We don't keep track of where the
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698