Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::NegativeSubmatchSuccess Class Reference

#include <regexp.h>

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

Public Member Functions

 NegativeSubmatchSuccess (intptr_t stack_pointer_reg, intptr_t position_reg, intptr_t clear_capture_count, intptr_t clear_capture_start, Zone *zone)
 
virtual void Emit (RegExpCompiler *compiler, Trace *trace)
 
- Public Member Functions inherited from dart::EndNode
 EndNode (Action action, Zone *zone)
 
virtual void Accept (NodeVisitor *visitor)
 
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 ()
 
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 intptr_t GreedyLoopTextLength ()
 
virtual RegExpNodeGetSuccessorOfOmnivorousTextNode (RegExpCompiler *compiler)
 
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

- Public Types inherited from dart::EndNode
enum  Action { ACCEPT , BACKTRACK , NEGATIVE_SUBMATCH_SUCCESS }
 
- 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 840 of file regexp.h.

Constructor & Destructor Documentation

◆ NegativeSubmatchSuccess()

dart::NegativeSubmatchSuccess::NegativeSubmatchSuccess ( intptr_t  stack_pointer_reg,
intptr_t  position_reg,
intptr_t  clear_capture_count,
intptr_t  clear_capture_start,
Zone zone 
)
inline

Definition at line 842 of file regexp.h.

848 stack_pointer_register_(stack_pointer_reg),
849 current_position_register_(position_reg),
850 clear_capture_count_(clear_capture_count),
851 clear_capture_start_(clear_capture_start) {}
EndNode(Action action, Zone *zone)
Definition regexp.h:812
@ NEGATIVE_SUBMATCH_SUCCESS
Definition regexp.h:811
Zone * zone() const
Definition regexp.h:483

Member Function Documentation

◆ Emit()

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

Reimplemented from dart::EndNode.

Definition at line 702 of file regexp.cc.

702 {
703 RegExpMacroAssembler* assembler = compiler->macro_assembler();
704
705 // Omit flushing the trace. We discard the entire stack frame anyway.
706
707 if (!label()->is_bound()) {
708 // We are completely independent of the trace, since we ignore it,
709 // so this code can be used as the generic version.
710 assembler->BindBlock(label());
711 }
712
713 // Throw away everything on the backtrack stack since the start
714 // of the negative submatch and restore the character position.
715 assembler->ReadCurrentPositionFromRegister(current_position_register_);
716 assembler->ReadStackPointerFromRegister(stack_pointer_register_);
717 if (clear_capture_count_ > 0) {
718 // Clear any captures that might have been performed during the success
719 // of the body of the negative look-ahead.
720 int clear_capture_end = clear_capture_start_ + clear_capture_count_ - 1;
721 assembler->ClearRegisters(clear_capture_start_, clear_capture_end);
722 }
723 // Now that we have unwound the stack we find at the top of the stack the
724 // backtrack that the BeginSubmatch node got.
725 assembler->Backtrack();
726}
BlockLabel * label()
Definition regexp.h:469

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