#include <regexp.h>
Definition at line 339 of file regexp.h.
◆ QuickCheckDetails() [1/2]
dart::QuickCheckDetails::QuickCheckDetails |
( |
| ) |
|
|
inline |
Definition at line 341 of file regexp.h.
342 : characters_(0), mask_(0), value_(0), cannot_match_(false) {}
◆ QuickCheckDetails() [2/2]
dart::QuickCheckDetails::QuickCheckDetails |
( |
intptr_t |
characters | ) |
|
|
inlineexplicit |
Definition at line 343 of file regexp.h.
344 : characters_(
characters), mask_(0), value_(0), cannot_match_(
false) {}
◆ Advance()
void dart::QuickCheckDetails::Advance |
( |
intptr_t |
by, |
|
|
bool |
one_byte |
|
) |
| |
Definition at line 1871 of file regexp.cc.
1871 {
1872 if (by >= characters_ || by < 0) {
1873
1874 ASSERT(by >= 0 || characters_ == 0);
1876 return;
1877 }
1878 for (intptr_t
i = 0;
i < characters_ - by;
i++) {
1879 positions_[
i] = positions_[by +
i];
1880 }
1881 for (intptr_t
i = characters_ - by;
i < characters_;
i++) {
1882 positions_[
i].
mask = 0;
1885 }
1886 characters_ -= by;
1887
1888
1889
1890}
bool determines_perfectly
◆ cannot_match()
bool dart::QuickCheckDetails::cannot_match |
( |
| ) |
|
|
inline |
Definition at line 351 of file regexp.h.
351{ return cannot_match_; }
◆ characters()
intptr_t dart::QuickCheckDetails::characters |
( |
| ) |
|
|
inline |
Definition at line 359 of file regexp.h.
359{ return characters_; }
◆ Clear()
void dart::QuickCheckDetails::Clear |
( |
| ) |
|
Definition at line 1862 of file regexp.cc.
1862 {
1863 for (
int i = 0;
i < characters_;
i++) {
1864 positions_[
i].
mask = 0;
1867 }
1868 characters_ = 0;
1869}
◆ mask()
uint32_t dart::QuickCheckDetails::mask |
( |
| ) |
|
|
inline |
◆ Merge()
void dart::QuickCheckDetails::Merge |
( |
QuickCheckDetails * |
other, |
|
|
intptr_t |
from_index |
|
) |
| |
Definition at line 1892 of file regexp.cc.
1892 {
1893 ASSERT(characters_ == other->characters_);
1894 if (other->cannot_match_) {
1895 return;
1896 }
1897 if (cannot_match_) {
1898 *this = *other;
1899 return;
1900 }
1901 for (intptr_t
i = from_index;
i < characters_;
i++) {
1903 QuickCheckDetails::Position* other_pos = other->positions(
i);
1904 if (
pos->mask != other_pos->mask ||
pos->value != other_pos->value ||
1905 !other_pos->determines_perfectly) {
1906
1907
1908 pos->determines_perfectly =
false;
1909 }
1910 pos->mask &= other_pos->mask;
1912 other_pos->value &=
pos->mask;
1913 uint16_t differing_bits = (
pos->value ^ other_pos->value);
1914 pos->mask &= ~differing_bits;
1916 }
1917}
Position * positions(intptr_t index)
◆ positions()
Position * dart::QuickCheckDetails::positions |
( |
intptr_t |
index | ) |
|
|
inline |
Definition at line 361 of file regexp.h.
361 {
363 ASSERT(index < characters_);
364 return positions_ + index;
365 }
◆ Rationalize()
bool dart::QuickCheckDetails::Rationalize |
( |
bool |
one_byte | ) |
|
Definition at line 1598 of file regexp.cc.
1598 {
1599 bool found_useful_op = false;
1600 uint32_t char_mask;
1601 if (asc) {
1603 } else {
1605 }
1606 mask_ = 0;
1607 value_ = 0;
1608 intptr_t char_shift = 0;
1609 for (intptr_t
i = 0;
i < characters_;
i++) {
1610 Position*
pos = &positions_[
i];
1612 found_useful_op = true;
1613 }
1614 mask_ |= (
pos->mask & char_mask) << char_shift;
1615 value_ |= (
pos->value & char_mask) << char_shift;
1616 char_shift += asc ? 8 : 16;
1617 }
1618 return found_useful_op;
1619}
static constexpr int32_t kMaxCodeUnit
◆ set_cannot_match()
void dart::QuickCheckDetails::set_cannot_match |
( |
| ) |
|
|
inline |
Definition at line 352 of file regexp.h.
352{ cannot_match_ = true; }
◆ set_characters()
void dart::QuickCheckDetails::set_characters |
( |
intptr_t |
characters | ) |
|
|
inline |
◆ value()
uint32_t dart::QuickCheckDetails::value |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:
- third_party/dart-lang/sdk/runtime/vm/regexp.h
- third_party/dart-lang/sdk/runtime/vm/regexp.cc