Skip to content

Commit

Permalink
Merge r235238 - YARR: Need to JIT compile a RegExp before using conta…
Browse files Browse the repository at this point in the history
…insNestedSubpatterns flag

https://bugs.webkit.org/show_bug.cgi?id=188895

Reviewed by Mark Lam.

Found while working on another change.  This will allow processing of nested
parenthesis that require saved ParenContext structures.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::compile):
  • Loading branch information
msaboff authored and carlosgcampos committed Sep 17, 2018
1 parent 49ec052 commit 17df000
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
13 changes: 13 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
2018-08-23 Michael Saboff <msaboff@apple.com>

YARR: Need to JIT compile a RegExp before using containsNestedSubpatterns flag
https://bugs.webkit.org/show_bug.cgi?id=188895

Reviewed by Mark Lam.

Found while working on another change. This will allow processing of nested
parenthesis that require saved ParenContext structures.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::compile):

2018-08-22 Mark Lam <mark.lam@apple.com>

The DFG CFGSimplification phase shouldn’t jettison a block when it’s the target of both branch directions.
Expand Down
10 changes: 5 additions & 5 deletions Source/JavaScriptCore/yarr/YarrJIT.cpp
Expand Up @@ -3545,11 +3545,6 @@ class YarrGenerator : public YarrJITInfo, private MacroAssembler {
}
#endif

#if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
if (m_containsNestedSubpatterns)
codeBlock.setUsesPaternContextBuffer();
#endif

// We need to compile before generating code since we set flags based on compilation that
// are used during generation.
opCompileBody(m_pattern.m_body);
Expand All @@ -3565,6 +3560,11 @@ class YarrGenerator : public YarrJITInfo, private MacroAssembler {
if (m_disassembler)
m_disassembler->setStartOfCode(label());

#if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
if (m_containsNestedSubpatterns)
codeBlock.setUsesPaternContextBuffer();
#endif

generateEnter();

Jump hasInput = checkInput();
Expand Down

0 comments on commit 17df000

Please sign in to comment.