diff options
Diffstat (limited to 'deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc')
-rw-r--r-- | deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc b/deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc index b574be8d74..9d2e62e1cb 100644 --- a/deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc +++ b/deps/v8/src/regexp/s390/regexp-macro-assembler-s390.cc @@ -137,6 +137,7 @@ RegExpMacroAssemblerS390::~RegExpMacroAssemblerS390() { check_preempt_label_.Unuse(); stack_overflow_label_.Unuse(); internal_failure_label_.Unuse(); + fallback_label_.Unuse(); } int RegExpMacroAssemblerS390::stack_limit_slack() { @@ -174,8 +175,13 @@ void RegExpMacroAssemblerS390::Backtrack() { __ CmpLogicalP(r2, Operand(backtrack_limit())); __ bne(&next); - // Exceeded limits are treated as a failed match. - Fail(); + // Backtrack limit exceeded. + if (can_fallback()) { + __ jmp(&fallback_label_); + } else { + // Can't fallback, so we treat it as a failed match. + Fail(); + } __ bind(&next); } @@ -949,6 +955,12 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) { __ b(&return_r2); } + if (fallback_label_.is_linked()) { + __ bind(&fallback_label_); + __ LoadImmP(r2, Operand(FALLBACK_TO_EXPERIMENTAL)); + __ b(&return_r2); + } + CodeDesc code_desc; masm_->GetCode(isolate(), &code_desc); Handle<Code> code = |