V8 Project
|
#include <jsregexp.h>
Public Member Functions | |
RegExpNode (Zone *zone) | |
virtual | ~RegExpNode () |
virtual void | Accept (NodeVisitor *visitor)=0 |
virtual void | Emit (RegExpCompiler *compiler, Trace *trace)=0 |
virtual int | EatsAtLeast (int still_to_find, int budget, bool not_at_start)=0 |
bool | EmitQuickCheck (RegExpCompiler *compiler, Trace *bounds_check_trace, Trace *trace, bool preload_has_checked_bounds, Label *on_possible_success, QuickCheckDetails *details_return, bool fall_through_on_failure) |
virtual void | GetQuickCheckDetails (QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)=0 |
virtual int | GreedyLoopTextLength () |
virtual RegExpNode * | GetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler) |
virtual void | FillInBMInfo (int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start) |
virtual RegExpNode * | FilterOneByte (int depth, bool ignore_case) |
RegExpNode * | replacement () |
RegExpNode * | set_replacement (RegExpNode *replacement) |
void | SaveBMInfo (BoyerMooreLookahead *bm, bool not_at_start, int offset) |
Label * | label () |
NodeInfo * | info () |
BoyerMooreLookahead * | bm_info (bool not_at_start) |
Zone * | zone () const |
![]() | |
INLINE (void *operator new(size_t size, Zone *zone)) | |
void | operator delete (void *, size_t) |
void | operator delete (void *pointer, Zone *zone) |
Static Public Attributes | |
static const int | kNodeIsTooComplexForGreedyLoops = -1 |
static const int | kRecursionBudget = 200 |
static const int | kMaxCopiesCodeGenerated = 10 |
Protected Types | |
enum | LimitResult { DONE , CONTINUE } |
Protected Member Functions | |
LimitResult | LimitVersions (RegExpCompiler *compiler, Trace *trace) |
void | set_bm_info (bool not_at_start, BoyerMooreLookahead *bm) |
Protected Attributes | |
RegExpNode * | replacement_ |
Private Attributes | |
Label | label_ |
NodeInfo | info_ |
int | trace_count_ |
BoyerMooreLookahead * | bm_info_ [2] |
Zone * | zone_ |
Static Private Attributes | |
static const int | kFirstCharBudget = 10 |
Definition at line 571 of file jsregexp.h.
|
protected |
|
inlineexplicit |
Definition at line 573 of file jsregexp.h.
|
virtual |
Definition at line 2225 of file jsregexp.cc.
|
pure virtual |
Implemented in v8::internal::LoopChoiceNode, v8::internal::ChoiceNode, v8::internal::EndNode, v8::internal::BackReferenceNode, v8::internal::AssertionNode, v8::internal::TextNode, and v8::internal::ActionNode.
Referenced by v8::internal::Analysis::EnsureAnalyzed().
|
inline |
Definition at line 664 of file jsregexp.h.
References bm_info_.
Referenced by v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch().
|
pure virtual |
Implemented in v8::internal::EndNode, v8::internal::BackReferenceNode, v8::internal::LoopChoiceNode, v8::internal::NegativeLookaheadChoiceNode, v8::internal::ChoiceNode, v8::internal::AssertionNode, v8::internal::TextNode, and v8::internal::ActionNode.
Referenced by v8::internal::NegativeLookaheadChoiceNode::EatsAtLeast(), and v8::internal::ChoiceNode::EatsAtLeastHelper().
|
pure virtual |
Implemented in v8::internal::LoopChoiceNode, v8::internal::ChoiceNode, v8::internal::NegativeSubmatchSuccess, v8::internal::EndNode, v8::internal::BackReferenceNode, v8::internal::AssertionNode, v8::internal::TextNode, and v8::internal::ActionNode.
Referenced by v8::internal::RegExpCompiler::Assemble(), v8::internal::ActionNode::Emit(), v8::internal::BackReferenceNode::Emit(), v8::internal::ChoiceNode::EmitChoices(), v8::internal::EmitHat(), v8::internal::ChoiceNode::EmitOutOfLineContinuation(), and v8::internal::Trace::Flush().
bool v8::internal::RegExpNode::EmitQuickCheck | ( | RegExpCompiler * | compiler, |
Trace * | bounds_check_trace, | ||
Trace * | trace, | ||
bool | preload_has_checked_bounds, | ||
Label * | on_possible_success, | ||
QuickCheckDetails * | details_return, | ||
bool | fall_through_on_failure | ||
) |
Definition at line 2445 of file jsregexp.cc.
References v8::internal::Trace::at_start(), v8::internal::Trace::backtrack(), v8::internal::QuickCheckDetails::cannot_match(), v8::internal::RegExpMacroAssembler::CanReadUnaligned(), v8::internal::QuickCheckDetails::characters(), v8::internal::Trace::characters_preloaded(), v8::internal::RegExpMacroAssembler::CheckCharacter(), v8::internal::RegExpMacroAssembler::CheckCharacterAfterAnd(), v8::internal::RegExpMacroAssembler::CheckNotCharacter(), v8::internal::RegExpMacroAssembler::CheckNotCharacterAfterAnd(), v8::internal::Trace::cp_offset(), DCHECK, v8::internal::Trace::FALSE_VALUE, v8::internal::String::kMaxOneByteCharCode, v8::internal::String::kMaxUtf16CodeUnit, v8::internal::RegExpMacroAssembler::LoadCurrentCharacter(), v8::internal::RegExpCompiler::macro_assembler(), v8::internal::QuickCheckDetails::mask(), v8::internal::RegExpCompiler::one_byte(), v8::internal::QuickCheckDetails::Rationalize(), and v8::internal::QuickCheckDetails::value().
Referenced by v8::internal::ChoiceNode::EmitChoices().
|
inlinevirtual |
Reimplemented in v8::internal::LoopChoiceNode, v8::internal::NegativeLookaheadChoiceNode, v8::internal::ChoiceNode, v8::internal::EndNode, v8::internal::BackReferenceNode, v8::internal::AssertionNode, v8::internal::TextNode, v8::internal::ActionNode, and v8::internal::SeqRegExpNode.
Definition at line 622 of file jsregexp.h.
References UNREACHABLE.
Referenced by v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch(), v8::internal::SeqRegExpNode::FillInBMInfo(), v8::internal::TextNode::FillInBMInfo(), and v8::internal::ChoiceNode::FillInBMInfo().
|
inlinevirtual |
Reimplemented in v8::internal::LoopChoiceNode, v8::internal::NegativeLookaheadChoiceNode, v8::internal::ChoiceNode, v8::internal::TextNode, and v8::internal::SeqRegExpNode.
Definition at line 632 of file jsregexp.h.
Referenced by v8::internal::RegExpEngine::Compile(), v8::internal::ChoiceNode::FilterOneByte(), v8::internal::NegativeLookaheadChoiceNode::FilterOneByte(), v8::internal::LoopChoiceNode::FilterOneByte(), and v8::internal::SeqRegExpNode::FilterSuccessor().
|
pure virtual |
Implemented in v8::internal::AssertionNode, v8::internal::ActionNode, v8::internal::LoopChoiceNode, v8::internal::NegativeLookaheadChoiceNode, v8::internal::ChoiceNode, v8::internal::EndNode, v8::internal::BackReferenceNode, and v8::internal::TextNode.
Referenced by v8::internal::ChoiceNode::GetQuickCheckDetails(), v8::internal::NegativeLookaheadChoiceNode::GetQuickCheckDetails(), and v8::internal::ActionNode::GetQuickCheckDetails().
|
inlinevirtual |
Reimplemented in v8::internal::TextNode.
Definition at line 611 of file jsregexp.h.
References NULL.
Referenced by v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch().
|
inlinevirtual |
Reimplemented in v8::internal::TextNode, and v8::internal::ActionNode.
Definition at line 608 of file jsregexp.h.
References kNodeIsTooComplexForGreedyLoops.
Referenced by v8::internal::ChoiceNode::GreedyLoopTextLengthForAlternative().
|
inline |
Definition at line 662 of file jsregexp.h.
References info_.
Referenced by v8::internal::Analysis::EnsureAnalyzed(), replacement(), set_replacement(), and v8::internal::Analysis::VisitLoopChoice().
|
inline |
|
protected |
Definition at line 2229 of file jsregexp.cc.
References v8::internal::RegExpCompiler::AddWork(), v8::internal::RegExpMacroAssembler::Bind(), v8::internal::DONE, v8::internal::Trace::Flush(), v8::internal::RegExpMacroAssembler::GoTo(), v8::internal::Trace::is_trivial(), v8::internal::RegExpCompiler::kMaxRecursion, v8::internal::RegExpCompiler::macro_assembler(), NULL, v8::internal::RegExpCompiler::recursion_depth(), and v8::internal::Trace::stop_node().
Referenced by v8::internal::ActionNode::Emit(), v8::internal::BackReferenceNode::Emit(), and v8::internal::ChoiceNode::Emit().
|
inline |
Definition at line 636 of file jsregexp.h.
References DCHECK, info(), and replacement_.
Referenced by set_replacement().
|
inline |
Definition at line 650 of file jsregexp.h.
References set_bm_info().
Referenced by v8::internal::BackReferenceNode::FillInBMInfo(), and v8::internal::ChoiceNode::FillInBMInfo().
|
inlineprotected |
Definition at line 676 of file jsregexp.h.
References bm_info_.
Referenced by v8::internal::SeqRegExpNode::FillInBMInfo(), v8::internal::TextNode::FillInBMInfo(), v8::internal::NegativeLookaheadChoiceNode::FillInBMInfo(), and SaveBMInfo().
|
inline |
Definition at line 640 of file jsregexp.h.
References info(), replacement(), replacement_, and v8::internal::NodeInfo::replacement_calculated.
|
inline |
Definition at line 668 of file jsregexp.h.
References zone_.
Referenced by v8::internal::ChoiceNode::AddAlternative(), v8::internal::AssertionNode::AfterNewline(), v8::internal::AssertionNode::AtBoundary(), v8::internal::AssertionNode::AtEnd(), v8::internal::AssertionNode::AtNonBoundary(), v8::internal::AssertionNode::AtStart(), v8::internal::ActionNode::BeginSubmatch(), v8::internal::ActionNode::ClearCaptures(), v8::internal::ChoiceNode::Emit(), v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch(), v8::internal::ActionNode::EmptyMatchCheck(), v8::internal::Analysis::EnsureAnalyzed(), v8::internal::TextNode::FillInBMInfo(), v8::internal::ActionNode::IncrementRegister(), v8::internal::ActionNode::PositiveSubmatchSuccess(), v8::internal::ActionNode::SetRegister(), v8::internal::ActionNode::StorePosition(), and v8::internal::TextNode::TextNode().
|
private |
Definition at line 690 of file jsregexp.h.
Referenced by bm_info(), RegExpNode(), and set_bm_info().
|
private |
Definition at line 683 of file jsregexp.h.
Referenced by info().
|
staticprivate |
Definition at line 681 of file jsregexp.h.
|
static |
Definition at line 660 of file jsregexp.h.
|
static |
Definition at line 607 of file jsregexp.h.
Referenced by v8::internal::ChoiceNode::Emit(), GreedyLoopTextLength(), and v8::internal::ActionNode::GreedyLoopTextLength().
|
static |
Definition at line 621 of file jsregexp.h.
Referenced by v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch(), and v8::internal::ChoiceNode::SetUpPreLoad().
|
private |
Definition at line 682 of file jsregexp.h.
Referenced by label().
|
protected |
Definition at line 672 of file jsregexp.h.
Referenced by replacement(), and set_replacement().
|
private |
Definition at line 689 of file jsregexp.h.
|
private |
Definition at line 692 of file jsregexp.h.
Referenced by zone().