v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ChoiceNode Class Reference

#include <jsregexp.h>

Inheritance diagram for ChoiceNode:
Collaboration diagram for ChoiceNode:

Public Member Functions

 ChoiceNode (int expected_size, Zone *zone)
 
virtual void Accept (NodeVisitor *visitor)
 
void AddAlternative (GuardedAlternative node)
 
ZoneList< GuardedAlternative > * alternatives ()
 
DispatchTableGetTable (bool ignore_case)
 
virtual void Emit (RegExpCompiler *compiler, Trace *trace)
 
virtual int EatsAtLeast (int still_to_find, int budget, bool not_at_start)
 
int EatsAtLeastHelper (int still_to_find, int budget, RegExpNode *ignore_this_node, bool not_at_start)
 
virtual void GetQuickCheckDetails (QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
 
virtual void FillInBMInfo (int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
 
bool being_calculated ()
 
bool not_at_start ()
 
void set_not_at_start ()
 
void set_being_calculated (bool b)
 
virtual bool try_to_emit_quick_check_for_alternative (int i)
 
virtual RegExpNodeFilterASCII (int depth, bool ignore_case)
 
- Public Member Functions inherited from RegExpNode
 RegExpNode (Zone *zone)
 
virtual ~RegExpNode ()
 
bool EmitQuickCheck (RegExpCompiler *compiler, Trace *trace, bool preload_has_checked_bounds, Label *on_possible_success, QuickCheckDetails *details_return, bool fall_through_on_failure)
 
virtual int GreedyLoopTextLength ()
 
virtual RegExpNodeGetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler)
 
RegExpNodereplacement ()
 
RegExpNodeset_replacement (RegExpNode *replacement)
 
void SaveBMInfo (BoyerMooreLookahead *bm, bool not_at_start, int offset)
 
Label * label ()
 
NodeInfoinfo ()
 
BoyerMooreLookaheadbm_info (bool not_at_start)
 
Zonezone () const
 
- Public Member Functions inherited from ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Protected Member Functions

int GreedyLoopTextLengthForAlternative (GuardedAlternative *alternative)
 
- Protected Member Functions inherited from RegExpNode
LimitResult LimitVersions (RegExpCompiler *compiler, Trace *trace)
 
void set_bm_info (bool not_at_start, BoyerMooreLookahead *bm)
 

Protected Attributes

ZoneList< GuardedAlternative > * alternatives_
 
- Protected Attributes inherited from RegExpNode
RegExpNodereplacement_
 

Friends

class DispatchTableConstructor
 
class Analysis
 

Additional Inherited Members

- Static Public Attributes inherited from RegExpNode
static const int kNodeIsTooComplexForGreedyLoops = -1
 
static const int kRecursionBudget = 200
 
static const int kMaxCopiesCodeGenerated = 10
 
- Protected Types inherited from RegExpNode
enum  LimitResult { DONE, CONTINUE }
 

Detailed Description

Definition at line 1065 of file jsregexp.h.

Constructor & Destructor Documentation

ChoiceNode ( int  expected_size,
Zone zone 
)
inlineexplicit

Definition at line 1067 of file jsregexp.h.

Member Function Documentation

virtual void Accept ( NodeVisitor visitor)
virtual

Implements RegExpNode.

Reimplemented in LoopChoiceNode.

void AddAlternative ( GuardedAlternative  node)
inline
bool being_calculated ( )
inline

Definition at line 1095 of file jsregexp.h.

int EatsAtLeast ( int  still_to_find,
int  budget,
bool  not_at_start 
)
virtual

Implements RegExpNode.

Reimplemented in LoopChoiceNode, and NegativeLookaheadChoiceNode.

Definition at line 2432 of file jsregexp.cc.

References v8::internal::NULL.

Referenced by ChoiceNode::Emit().

int EatsAtLeastHelper ( int  still_to_find,
int  budget,
RegExpNode ignore_this_node,
bool  not_at_start 
)

Definition at line 2402 of file jsregexp.cc.

References RegExpNode::EatsAtLeast().

void Emit ( RegExpCompiler compiler,
Trace trace 
)
virtual

Implements RegExpNode.

Reimplemented in LoopChoiceNode.

Definition at line 3928 of file jsregexp.cc.

References Trace::actions(), RegExpMacroAssembler::AdvanceCurrentPosition(), AlternativeGeneration::after, ChoiceNode::alternatives_, RegExpCompiler::ascii(), ASSERT, List< T, ZoneAllocationPolicy >::at(), AlternativeGenerationList::at(), Trace::at_start(), Trace::backtrack(), RegExpMacroAssembler::Bind(), RegExpNode::bm_info(), QuickCheckDetails::cannot_match(), Trace::characters_preloaded(), RegExpMacroAssembler::CheckGreedyLoop(), QuickCheckDetails::Clear(), RegExpNode::CONTINUE, RegExpNode::DONE, ChoiceNode::EatsAtLeast(), RegExpNode::Emit(), RegExpNode::EmitQuickCheck(), BoyerMooreLookahead::EmitSkipInstructions(), AlternativeGeneration::expects_preload, Trace::FALSE_VALUE, RegExpNode::FillInBMInfo(), Trace::Flush(), Trace::flush_budget(), RegExpNode::GetSuccessorOfOmnivorousTextNode(), RegExpMacroAssembler::GoTo(), ChoiceNode::GreedyLoopTextLengthForAlternative(), GuardedAlternative::guards(), Trace::InvalidateCurrentCharacter(), Trace::is_trivial(), v8::internal::kMaxLookaheadForBoyerMoore, RegExpNode::kNodeIsTooComplexForGreedyLoops, RegExpNode::kRecursionBudget, RegExpNode::LimitVersions(), RegExpCompiler::macro_assembler(), Trace::mentions_reg(), v8::internal::Min(), GuardedAlternative::node(), ChoiceNode::not_at_start(), v8::internal::NULL, AlternativeGeneration::possible_success, RegExpMacroAssembler::PushCurrentPosition(), AlternativeGeneration::quick_check_details, Trace::quick_check_performed(), Trace::set_at_start(), Trace::set_backtrack(), Trace::set_bound_checked_up_to(), QuickCheckDetails::set_characters(), Trace::set_characters_preloaded(), Trace::set_flush_budget(), Trace::set_loop_label(), Trace::set_quick_check_performed(), Trace::set_stop_node(), Trace::stop_node(), ChoiceNode::try_to_emit_quick_check_for_alternative(), and RegExpNode::zone().

Referenced by LoopChoiceNode::Emit().

RegExpNode * FilterASCII ( int  depth,
bool  ignore_case 
)
virtual
void GetQuickCheckDetails ( QuickCheckDetails details,
RegExpCompiler compiler,
int  characters_filled_in,
bool  not_at_start 
)
virtual
DispatchTable * GetTable ( bool  ignore_case)

Definition at line 962 of file jsregexp.cc.

References DispatchTableConstructor::BuildTable(), and v8::internal::NULL.

int GreedyLoopTextLengthForAlternative ( GuardedAlternative alternative)
protected
bool not_at_start ( )
inline

Definition at line 1096 of file jsregexp.h.

Referenced by ChoiceNode::Emit().

void set_being_calculated ( bool  b)
inline

Definition at line 1098 of file jsregexp.h.

Referenced by DispatchTableConstructor::BuildTable().

void set_not_at_start ( )
inline

Definition at line 1097 of file jsregexp.h.

virtual bool try_to_emit_quick_check_for_alternative ( int  i)
inlinevirtual

Reimplemented in NegativeLookaheadChoiceNode.

Definition at line 1099 of file jsregexp.h.

Referenced by ChoiceNode::Emit().

Friends And Related Function Documentation

friend class Analysis
friend

Definition at line 1108 of file jsregexp.h.

friend class DispatchTableConstructor
friend

Definition at line 1107 of file jsregexp.h.

Field Documentation


The documentation for this class was generated from the following files: