Definition at line 292 of file regexp.cc.
◆ RegExpCompiler()
dart::RegExpCompiler::RegExpCompiler |
( |
intptr_t |
capture_count, |
|
|
bool |
is_one_byte |
|
) |
| |
Definition at line 390 of file regexp.cc.
391 : next_register_(2 * (capture_count + 1)),
393 unicode_lookaround_position_register_(
kNoRegister),
394 work_list_(nullptr),
395 recursion_depth_(0),
396 is_one_byte_(is_one_byte),
397 reg_exp_too_big_(false),
398 read_backward_(false),
399 current_expansion_factor_(1),
402}
static constexpr intptr_t kNoRegister
static Thread * Current()
◆ accept()
EndNode * dart::RegExpCompiler::accept |
( |
| ) |
|
|
inline |
◆ AddWork()
void dart::RegExpCompiler::AddWork |
( |
RegExpNode * |
node | ) |
|
|
inline |
Definition at line 327 of file regexp.cc.
327{ work_list_->Add(node); }
◆ AllocateRegister()
intptr_t dart::RegExpCompiler::AllocateRegister |
( |
| ) |
|
|
inline |
Definition at line 296 of file regexp.cc.
296{ return next_register_++; }
◆ Assemble() [1/2]
Definition at line 436 of file regexp.cc.
440 {
443
444 ZoneGrowableArray<RegExpNode*> work_list(0);
445 work_list_ = &work_list;
448 Trace new_trace;
449 start->Emit(
this, &new_trace);
451 macro_assembler_->
Fail();
452 while (!work_list.is_empty()) {
453 work_list.RemoveLast()->Emit(this, &new_trace);
454 }
456
458 return RegExpEngine::CompilationResult(&bytecode, next_register_);
459}
static void fail(const SkString &err)
static Object & ZoneHandle()
RegExpMacroAssembler * macro_assembler()
virtual void BindBlock(BlockLabel *label)=0
void set_slow_safe(bool ssc)
virtual void PushBacktrack(BlockLabel *label)=0
static RegExpEngine::CompilationResult IrregexpRegExpTooBig()
◆ Assemble() [2/2]
Definition at line 405 of file regexp.cc.
409 {
412
413 ZoneGrowableArray<RegExpNode*> work_list(0);
414 work_list_ = &work_list;
417 Trace new_trace;
418 start->Emit(
this, &new_trace);
420 macro_assembler_->
Fail();
421 while (!work_list.is_empty()) {
422 work_list.RemoveLast()->Emit(this, &new_trace);
423 }
425
428
429 return RegExpEngine::CompilationResult(
432 next_register_);
433}
◆ current_expansion_factor()
intptr_t dart::RegExpCompiler::current_expansion_factor |
( |
| ) |
|
|
inline |
Definition at line 348 of file regexp.cc.
348{ return current_expansion_factor_; }
◆ DecrementRecursionDepth()
void dart::RegExpCompiler::DecrementRecursionDepth |
( |
| ) |
|
|
inline |
Definition at line 339 of file regexp.cc.
339{ recursion_depth_--; }
◆ frequency_collator()
Definition at line 346 of file regexp.cc.
346{ return &frequency_collator_; }
◆ IncrementRecursionDepth()
void dart::RegExpCompiler::IncrementRecursionDepth |
( |
| ) |
|
|
inline |
Definition at line 338 of file regexp.cc.
338{ recursion_depth_++; }
◆ macro_assembler()
Definition at line 333 of file regexp.cc.
333{ return macro_assembler_; }
◆ one_byte()
bool dart::RegExpCompiler::one_byte |
( |
| ) |
const |
|
inline |
Definition at line 343 of file regexp.cc.
343{ return is_one_byte_; }
◆ read_backward()
bool dart::RegExpCompiler::read_backward |
( |
| ) |
|
|
inline |
Definition at line 344 of file regexp.cc.
344{ return read_backward_; }
◆ recursion_depth()
intptr_t dart::RegExpCompiler::recursion_depth |
( |
| ) |
|
|
inline |
Definition at line 337 of file regexp.cc.
337{ return recursion_depth_; }
◆ set_current_expansion_factor()
void dart::RegExpCompiler::set_current_expansion_factor |
( |
intptr_t |
value | ) |
|
|
inline |
Definition at line 349 of file regexp.cc.
349 {
350 current_expansion_factor_ =
value;
351 }
◆ set_read_backward()
void dart::RegExpCompiler::set_read_backward |
( |
bool |
value | ) |
|
|
inline |
◆ SetRegExpTooBig()
void dart::RegExpCompiler::SetRegExpTooBig |
( |
| ) |
|
|
inline |
Definition at line 341 of file regexp.cc.
341{ reg_exp_too_big_ = true; }
◆ UnicodeLookaroundPositionRegister()
intptr_t dart::RegExpCompiler::UnicodeLookaroundPositionRegister |
( |
| ) |
|
|
inline |
Definition at line 307 of file regexp.cc.
307 {
308 if (unicode_lookaround_position_register_ ==
kNoRegister) {
310 }
311 return unicode_lookaround_position_register_;
312 }
intptr_t AllocateRegister()
◆ UnicodeLookaroundStackRegister()
intptr_t dart::RegExpCompiler::UnicodeLookaroundStackRegister |
( |
| ) |
|
|
inline |
Definition at line 300 of file regexp.cc.
300 {
301 if (unicode_lookaround_stack_register_ ==
kNoRegister) {
303 }
304 return unicode_lookaround_stack_register_;
305 }
◆ zone()
Zone * dart::RegExpCompiler::zone |
( |
| ) |
const |
|
inline |
◆ kCodeOffset
constexpr intptr_t dart::RegExpCompiler::kCodeOffset = 1 |
|
staticconstexpr |
◆ kImplementationOffset
constexpr intptr_t dart::RegExpCompiler::kImplementationOffset = 0 |
|
staticconstexpr |
◆ kMaxRecursion
constexpr intptr_t dart::RegExpCompiler::kMaxRecursion = 100 |
|
staticconstexpr |
◆ kNoRegister
constexpr intptr_t dart::RegExpCompiler::kNoRegister = -1 |
|
staticconstexpr |
◆ kNumberOfRegistersOffset
constexpr intptr_t dart::RegExpCompiler::kNumberOfRegistersOffset = 0 |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/vm/regexp.cc