V8 Project
v8::internal::EndNode Class Reference

#include <jsregexp.h>

+ Inheritance diagram for v8::internal::EndNode:
+ Collaboration diagram for v8::internal::EndNode:

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 int EatsAtLeast (int still_to_find, int recursion_depth, 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)
 
- Public Member Functions inherited from v8::internal::RegExpNode
 RegExpNode (Zone *zone)
 
virtual ~RegExpNode ()
 
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 int GreedyLoopTextLength ()
 
virtual RegExpNodeGetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler)
 
virtual RegExpNodeFilterOneByte (int depth, bool ignore_case)
 
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 v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Private Attributes

Action action_
 

Additional Inherited Members

- Static Public Attributes inherited from v8::internal::RegExpNode
static const int kNodeIsTooComplexForGreedyLoops = -1
 
static const int kRecursionBudget = 200
 
static const int kMaxCopiesCodeGenerated = 10
 
- Protected Types inherited from v8::internal::RegExpNode
enum  LimitResult { DONE , CONTINUE }
 
- 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 inherited from v8::internal::RegExpNode
RegExpNodereplacement_
 

Detailed Description

Definition at line 964 of file jsregexp.h.

Member Enumeration Documentation

◆ Action

Enumerator
ACCEPT 
BACKTRACK 
NEGATIVE_SUBMATCH_SUCCESS 

Definition at line 966 of file jsregexp.h.

Constructor & Destructor Documentation

◆ EndNode()

v8::internal::EndNode::EndNode ( Action  action,
Zone zone 
)
inlineexplicit

Definition at line 967 of file jsregexp.h.

968  : RegExpNode(zone), action_(action) { }
Zone * zone() const
Definition: jsregexp.h:668
RegExpNode(Zone *zone)
Definition: jsregexp.h:573

Member Function Documentation

◆ Accept()

virtual void v8::internal::EndNode::Accept ( NodeVisitor visitor)
virtual

◆ EatsAtLeast()

virtual int v8::internal::EndNode::EatsAtLeast ( int  still_to_find,
int  recursion_depth,
bool  not_at_start 
)
inlinevirtual

Implements v8::internal::RegExpNode.

Definition at line 971 of file jsregexp.h.

973  { return 0; }

◆ Emit()

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

Implements v8::internal::RegExpNode.

Reimplemented in v8::internal::NegativeSubmatchSuccess.

Definition at line 1441 of file jsregexp.cc.

1441  {
1442  if (!trace->is_trivial()) {
1443  trace->Flush(compiler, this);
1444  return;
1445  }
1446  RegExpMacroAssembler* assembler = compiler->macro_assembler();
1447  if (!label()->is_bound()) {
1448  assembler->Bind(label());
1449  }
1450  switch (action_) {
1451  case ACCEPT:
1452  assembler->Succeed();
1453  return;
1454  case BACKTRACK:
1455  assembler->GoTo(trace->backtrack());
1456  return;
1458  // This case is handled in a different virtual method.
1459  UNREACHABLE();
1460  }
1461  UNIMPLEMENTED();
1462 }
#define UNREACHABLE()
Definition: logging.h:30
#define UNIMPLEMENTED()
Definition: logging.h:28

References v8::internal::Trace::backtrack(), v8::internal::RegExpMacroAssembler::Bind(), v8::internal::Trace::Flush(), v8::internal::RegExpMacroAssembler::GoTo(), v8::internal::Trace::is_trivial(), v8::internal::RegExpCompiler::macro_assembler(), v8::internal::RegExpMacroAssembler::Succeed(), UNIMPLEMENTED, and UNREACHABLE.

+ Here is the call graph for this function:

◆ FillInBMInfo()

virtual void v8::internal::EndNode::FillInBMInfo ( int  offset,
int  budget,
BoyerMooreLookahead bm,
bool  not_at_start 
)
inlinevirtual

Reimplemented from v8::internal::RegExpNode.

Definition at line 981 of file jsregexp.h.

984  {
985  // Returning 0 from EatsAtLeast should ensure we never get here.
986  UNREACHABLE();
987  }

References UNREACHABLE.

◆ GetQuickCheckDetails()

virtual void v8::internal::EndNode::GetQuickCheckDetails ( QuickCheckDetails details,
RegExpCompiler compiler,
int  characters_filled_in,
bool  not_at_start 
)
inlinevirtual

Implements v8::internal::RegExpNode.

Definition at line 974 of file jsregexp.h.

977  {
978  // Returning 0 from EatsAtLeast should ensure we never get here.
979  UNREACHABLE();
980  }

References UNREACHABLE.

Member Data Documentation

◆ action_

Action v8::internal::EndNode::action_
private

Definition at line 990 of file jsregexp.h.


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