Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
dart::EndNode Class Reference

#include <regexp.h>

Inheritance diagram for dart::EndNode:
dart::RegExpNode dart::ZoneAllocated dart::NegativeSubmatchSuccess

Public Types

enum  Action { ACCEPT , BACKTRACK , NEGATIVE_SUBMATCH_SUCCESS }
 

Public Member Functions

 EndNode (Action action, Zone *zone)
 
virtual void Accept (NodeVisitor *visitor)
 
virtual void Emit (RegExpCompiler *compiler, Trace *trace)
 
virtual intptr_t EatsAtLeast (intptr_t still_to_find, intptr_t recursion_depth, bool not_at_start)
 
virtual void GetQuickCheckDetails (QuickCheckDetails *details, RegExpCompiler *compiler, intptr_t characters_filled_in, bool not_at_start)
 
virtual void FillInBMInfo (intptr_t offset, intptr_t budget, BoyerMooreLookahead *bm, bool not_at_start)
 
- Public Member Functions inherited from dart::RegExpNode
 RegExpNode (Zone *zone)
 
virtual ~RegExpNode ()
 
virtual void Accept (NodeVisitor *visitor)=0
 
virtual void Emit (RegExpCompiler *compiler, Trace *trace)=0
 
virtual intptr_t EatsAtLeast (intptr_t still_to_find, intptr_t budget, bool not_at_start)=0
 
bool EmitQuickCheck (RegExpCompiler *compiler, Trace *bounds_check_trace, Trace *trace, bool preload_has_checked_bounds, BlockLabel *on_possible_success, QuickCheckDetails *details_return, bool fall_through_on_failure)
 
virtual void GetQuickCheckDetails (QuickCheckDetails *details, RegExpCompiler *compiler, intptr_t characters_filled_in, bool not_at_start)=0
 
virtual intptr_t GreedyLoopTextLength ()
 
virtual RegExpNodeGetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler)
 
virtual void FillInBMInfo (intptr_t offset, intptr_t budget, BoyerMooreLookahead *bm, bool not_at_start)
 
virtual RegExpNodeFilterOneByte (intptr_t depth)
 
RegExpNodereplacement ()
 
RegExpNodeset_replacement (RegExpNode *replacement)
 
void SaveBMInfo (BoyerMooreLookahead *bm, bool not_at_start, intptr_t offset)
 
BlockLabellabel ()
 
NodeInfoinfo ()
 
BoyerMooreLookaheadbm_info (bool not_at_start)
 
Zonezone () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Static Public Attributes inherited from dart::RegExpNode
static constexpr intptr_t kNodeIsTooComplexForGreedyLoops = -1
 
static constexpr intptr_t kRecursionBudget = 200
 
static constexpr intptr_t kMaxCopiesCodeGenerated = 10
 
- Protected Types inherited from dart::RegExpNode
enum  LimitResult { DONE , CONTINUE }
 
- Protected Member Functions inherited from dart::RegExpNode
LimitResult LimitVersions (RegExpCompiler *compiler, Trace *trace)
 
void set_bm_info (bool not_at_start, BoyerMooreLookahead *bm)
 
- Protected Attributes inherited from dart::RegExpNode
RegExpNodereplacement_
 

Detailed Description

Definition at line 809 of file regexp.h.

Member Enumeration Documentation

◆ Action

Enumerator
ACCEPT 
BACKTRACK 
NEGATIVE_SUBMATCH_SUCCESS 

Definition at line 811 of file regexp.h.

Constructor & Destructor Documentation

◆ EndNode()

dart::EndNode::EndNode ( Action  action,
Zone zone 
)
inlineexplicit

Definition at line 812 of file regexp.h.

813 : RegExpNode(zone), action_(action) {}
Zone * zone() const
Definition: regexp.h:483
RegExpNode(Zone *zone)
Definition: regexp.h:386

Member Function Documentation

◆ Accept()

virtual void dart::EndNode::Accept ( NodeVisitor visitor)
virtual

Implements dart::RegExpNode.

◆ EatsAtLeast()

virtual intptr_t dart::EndNode::EatsAtLeast ( intptr_t  still_to_find,
intptr_t  recursion_depth,
bool  not_at_start 
)
inlinevirtual

Implements dart::RegExpNode.

Definition at line 816 of file regexp.h.

818 {
819 return 0;
820 }

◆ Emit()

void dart::EndNode::Emit ( RegExpCompiler compiler,
Trace trace 
)
virtual

Implements dart::RegExpNode.

Reimplemented in dart::NegativeSubmatchSuccess.

Definition at line 728 of file regexp.cc.

728 {
729 if (!trace->is_trivial()) {
730 trace->Flush(compiler, this);
731 return;
732 }
733 RegExpMacroAssembler* assembler = compiler->macro_assembler();
734 if (!label()->is_bound()) {
735 assembler->BindBlock(label());
736 }
737 switch (action_) {
738 case ACCEPT:
739 assembler->Succeed();
740 return;
741 case BACKTRACK:
742 assembler->GoTo(trace->backtrack());
743 return;
745 // This case is handled in a different virtual method.
746 UNREACHABLE();
747 }
749}
#define UNREACHABLE()
Definition: assert.h:248
BlockLabel * label()
Definition: regexp.h:469
#define UNIMPLEMENTED

◆ FillInBMInfo()

virtual void dart::EndNode::FillInBMInfo ( intptr_t  offset,
intptr_t  budget,
BoyerMooreLookahead bm,
bool  not_at_start 
)
inlinevirtual

Reimplemented from dart::RegExpNode.

Definition at line 828 of file regexp.h.

831 {
832 // Returning 0 from EatsAtLeast should ensure we never get here.
833 UNREACHABLE();
834 }

◆ GetQuickCheckDetails()

virtual void dart::EndNode::GetQuickCheckDetails ( QuickCheckDetails details,
RegExpCompiler compiler,
intptr_t  characters_filled_in,
bool  not_at_start 
)
inlinevirtual

Implements dart::RegExpNode.

Definition at line 821 of file regexp.h.

824 {
825 // Returning 0 from EatsAtLeast should ensure we never get here.
826 UNREACHABLE();
827 }

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