v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ChoiceNode Class Reference

#include <regexp-nodes.h>

Inheritance diagram for v8::internal::ChoiceNode:
Collaboration diagram for v8::internal::ChoiceNode:

Public Member Functions

 ChoiceNode (int expected_size, Zone *zone)
 
ChoiceNodeAsChoiceNode () override
 
void Accept (NodeVisitor *visitor) override
 
void AddAlternative (GuardedAlternative node)
 
ZoneList< GuardedAlternative > * alternatives ()
 
void Emit (RegExpCompiler *compiler, Trace *trace) override
 
void GetQuickCheckDetails (QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start) override
 
void FillInBMInfo (Isolate *isolate, int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start) override
 
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 (bool is_first)
 
RegExpNodeFilterOneByte (int depth, RegExpCompiler *compiler) override
 
virtual bool read_backward ()
 
- Public Member Functions inherited from v8::internal::RegExpNode
 RegExpNode (Zone *zone)
 
virtual ~RegExpNode ()
 
uint32_t EatsAtLeast (bool not_at_start)
 
virtual EatsAtLeastInfo EatsAtLeastFromLoopEntry ()
 
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, ChoiceNode *predecessor)
 
virtual void GetQuickCheckDetailsFromLoopEntry (QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
 
virtual int GreedyLoopTextLength ()
 
virtual RegExpNodeGetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler)
 
bool KeepRecursing (RegExpCompiler *compiler)
 
RegExpNodereplacement ()
 
RegExpNodeset_replacement (RegExpNode *replacement)
 
void SaveBMInfo (BoyerMooreLookahead *bm, bool not_at_start, int offset)
 
Labellabel ()
 
bool on_work_list ()
 
void set_on_work_list (bool value)
 
NodeInfoinfo ()
 
const EatsAtLeastInfoeats_at_least_info () const
 
void set_eats_at_least_info (const EatsAtLeastInfo &eats_at_least)
 
void SetDoNotInline ()
 
BoyerMooreLookaheadbm_info (bool not_at_start)
 
virtual SeqRegExpNodeAsSeqRegExpNode ()
 
Zonezone () const
 
- Public Member Functions inherited from v8::internal::ZoneObject
void * operator new (size_t, Zone *)=delete
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)=delete
 

Protected Member Functions

int GreedyLoopTextLengthForAlternative (GuardedAlternative *alternative)
 
- Protected Member Functions inherited from v8::internal::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 v8::internal::RegExpNode
RegExpNodereplacement_
 

Private Member Functions

void GenerateGuard (RegExpMacroAssembler *macro_assembler, Guard *guard, Trace *trace)
 
int CalculatePreloadCharacters (RegExpCompiler *compiler, int eats_at_least)
 
void EmitOutOfLineContinuation (RegExpCompiler *compiler, Trace *trace, GuardedAlternative alternative, AlternativeGeneration *alt_gen, int preload_characters, bool next_expects_preload)
 
void SetUpPreLoad (RegExpCompiler *compiler, Trace *current_trace, PreloadState *preloads)
 
void AssertGuardsMentionRegisters (Trace *trace)
 
int EmitOptimizedUnanchoredSearch (RegExpCompiler *compiler, Trace *trace)
 
TraceEmitGreedyLoop (RegExpCompiler *compiler, Trace *trace, AlternativeGenerationList *alt_gens, PreloadState *preloads, GreedyLoopState *greedy_loop_state, int text_length)
 
void EmitChoices (RegExpCompiler *compiler, AlternativeGenerationList *alt_gens, int first_choice, Trace *trace, PreloadState *preloads)
 

Private Attributes

bool not_at_start_
 
bool being_calculated_
 

Friends

template<typename... >
class Analysis
 

Additional Inherited Members

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

Detailed Description

Definition at line 631 of file regexp-nodes.h.

Constructor & Destructor Documentation

◆ ChoiceNode()

v8::internal::ChoiceNode::ChoiceNode ( int expected_size,
Zone * zone )
inlineexplicit

Definition at line 633 of file regexp-nodes.h.

Member Function Documentation

◆ Accept()

void v8::internal::ChoiceNode::Accept ( NodeVisitor * visitor)
overridevirtual

◆ AddAlternative()

void v8::internal::ChoiceNode::AddAlternative ( GuardedAlternative node)
inline

Definition at line 641 of file regexp-nodes.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ alternatives()

ZoneList< GuardedAlternative > * v8::internal::ChoiceNode::alternatives ( )
inline

Definition at line 644 of file regexp-nodes.h.

Here is the caller graph for this function:

◆ AsChoiceNode()

ChoiceNode * v8::internal::ChoiceNode::AsChoiceNode ( )
inlineoverride

Definition at line 639 of file regexp-nodes.h.

◆ AssertGuardsMentionRegisters()

void v8::internal::ChoiceNode::AssertGuardsMentionRegisters ( Trace * trace)
private

Definition at line 3161 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ being_calculated()

bool v8::internal::ChoiceNode::being_calculated ( )
inline

Definition at line 652 of file regexp-nodes.h.

◆ CalculatePreloadCharacters()

int v8::internal::ChoiceNode::CalculatePreloadCharacters ( RegExpCompiler * compiler,
int eats_at_least )
private

Definition at line 2733 of file regexp-compiler.cc.

Here is the caller graph for this function:

◆ Emit()

void v8::internal::ChoiceNode::Emit ( RegExpCompiler * compiler,
Trace * trace )
overridevirtual

Implements v8::internal::RegExpNode.

Reimplemented in v8::internal::LoopChoiceNode.

Definition at line 3190 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitChoices()

void v8::internal::ChoiceNode::EmitChoices ( RegExpCompiler * compiler,
AlternativeGenerationList * alt_gens,
int first_choice,
Trace * trace,
PreloadState * preloads )
private

Definition at line 3338 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitGreedyLoop()

Trace * v8::internal::ChoiceNode::EmitGreedyLoop ( RegExpCompiler * compiler,
Trace * trace,
AlternativeGenerationList * alt_gens,
PreloadState * preloads,
GreedyLoopState * greedy_loop_state,
int text_length )
private

Definition at line 3250 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitOptimizedUnanchoredSearch()

int v8::internal::ChoiceNode::EmitOptimizedUnanchoredSearch ( RegExpCompiler * compiler,
Trace * trace )
private

Definition at line 3292 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmitOutOfLineContinuation()

void v8::internal::ChoiceNode::EmitOutOfLineContinuation ( RegExpCompiler * compiler,
Trace * trace,
GuardedAlternative alternative,
AlternativeGeneration * alt_gen,
int preload_characters,
bool next_expects_preload )
private

Definition at line 3421 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillInBMInfo()

void v8::internal::ChoiceNode::FillInBMInfo ( Isolate * isolate,
int offset,
int budget,
BoyerMooreLookahead * bm,
bool not_at_start )
overridevirtual

Reimplemented from v8::internal::RegExpNode.

Reimplemented in v8::internal::LoopChoiceNode, and v8::internal::NegativeLookaroundChoiceNode.

Definition at line 3955 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FilterOneByte()

RegExpNode * v8::internal::ChoiceNode::FilterOneByte ( int depth,
RegExpCompiler * compiler )
overridevirtual

Reimplemented from v8::internal::RegExpNode.

Reimplemented in v8::internal::LoopChoiceNode, and v8::internal::NegativeLookaroundChoiceNode.

Definition at line 2021 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateGuard()

void v8::internal::ChoiceNode::GenerateGuard ( RegExpMacroAssembler * macro_assembler,
Guard * guard,
Trace * trace )
private

Definition at line 731 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetQuickCheckDetails()

void v8::internal::ChoiceNode::GetQuickCheckDetails ( QuickCheckDetails * details,
RegExpCompiler * compiler,
int characters_filled_in,
bool not_at_start )
overridevirtual

Implements v8::internal::RegExpNode.

Reimplemented in v8::internal::LoopChoiceNode, and v8::internal::NegativeLookaroundChoiceNode.

Definition at line 2154 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GreedyLoopTextLengthForAlternative()

int v8::internal::ChoiceNode::GreedyLoopTextLengthForAlternative ( GuardedAlternative * alternative)
protected

Definition at line 2669 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ not_at_start()

bool v8::internal::ChoiceNode::not_at_start ( )
inline

Definition at line 653 of file regexp-nodes.h.

Here is the caller graph for this function:

◆ read_backward()

virtual bool v8::internal::ChoiceNode::read_backward ( )
inlinevirtual

Reimplemented in v8::internal::LoopChoiceNode.

Definition at line 660 of file regexp-nodes.h.

◆ set_being_calculated()

void v8::internal::ChoiceNode::set_being_calculated ( bool b)
inline

Definition at line 655 of file regexp-nodes.h.

◆ set_not_at_start()

void v8::internal::ChoiceNode::set_not_at_start ( )
inline

Definition at line 654 of file regexp-nodes.h.

◆ SetUpPreLoad()

void v8::internal::ChoiceNode::SetUpPreLoad ( RegExpCompiler * compiler,
Trace * current_trace,
PreloadState * preloads )
private

Definition at line 3175 of file regexp-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_to_emit_quick_check_for_alternative()

virtual bool v8::internal::ChoiceNode::try_to_emit_quick_check_for_alternative ( bool is_first)
inlinevirtual

Reimplemented in v8::internal::NegativeLookaroundChoiceNode.

Definition at line 656 of file regexp-nodes.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Analysis

template<typename... >
friend class Analysis
friend

Definition at line 668 of file regexp-nodes.h.

Member Data Documentation

◆ alternatives_

ZoneList<GuardedAlternative>* v8::internal::ChoiceNode::alternatives_
protected

Definition at line 664 of file regexp-nodes.h.

◆ being_calculated_

bool v8::internal::ChoiceNode::being_calculated_
private

Definition at line 693 of file regexp-nodes.h.

◆ not_at_start_

bool v8::internal::ChoiceNode::not_at_start_
private

Definition at line 692 of file regexp-nodes.h.


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