| Index: src/jsregexp.cc
|
| diff --git a/src/jsregexp.cc b/src/jsregexp.cc
|
| index 3455abce2399b3030a172e10ce1e2eb463f43647..cbfe18f4abed2d1ec310043adbd7b7e82072f2b6 100644
|
| --- a/src/jsregexp.cc
|
| +++ b/src/jsregexp.cc
|
| @@ -997,7 +997,7 @@ RegExpEngine::CompilationResult RegExpCompiler::Assemble(
|
|
|
| bool use_slow_safe_regexp_compiler = false;
|
| if (heap->total_regexp_code_generated() >
|
| - RegExpImpl::kRegWxpCompiledLimit &&
|
| + RegExpImpl::kRegExpCompiledLimit &&
|
| heap->isolate()->memory_allocator()->SizeExecutable() >
|
| RegExpImpl::kRegExpExecutableMemoryLimit) {
|
| use_slow_safe_regexp_compiler = true;
|
| @@ -3477,7 +3477,8 @@ void BoyerMoorePositionInfo::SetAll() {
|
| BoyerMooreLookahead::BoyerMooreLookahead(
|
| int length, RegExpCompiler* compiler)
|
| : length_(length),
|
| - compiler_(compiler) {
|
| + compiler_(compiler),
|
| + depth_(0) {
|
| if (compiler->ascii()) {
|
| max_char_ = String::kMaxAsciiCharCode;
|
| } else {
|
| @@ -5588,6 +5589,11 @@ STATIC_ASSERT(BoyerMoorePositionInfo::kMapSize ==
|
| void ChoiceNode::FillInBMInfo(
|
| int offset, BoyerMooreLookahead* bm, bool not_at_start) {
|
| ZoneList<GuardedAlternative>* alts = alternatives();
|
| + if (bm->MaxDepthExceeded()) {
|
| + bm->SetRest(offset); // Give up trying to fill in info.
|
| + SaveBMInfo(bm, not_at_start, offset);
|
| + return;
|
| + }
|
| for (int i = 0; i < alts->length(); i++) {
|
| GuardedAlternative& alt = alts->at(i);
|
| if (alt.guards() != NULL && alt.guards()->length() != 0) {
|
|
|