V8 Project
|
Classes | |
class | Visitor |
Public Types | |
enum | State { kEndsWithLeadingSurrogate = 1 << 0 , kStartsWithTrailingSurrogate = 1 << 1 , kLeftmostEdgeIsCalculated = 1 << 2 , kRightmostEdgeIsCalculated = 1 << 3 , kLeftmostEdgeIsSurrogate = 1 << 4 , kRightmostEdgeIsSurrogate = 1 << 5 } |
Static Public Member Functions | |
static bool | EndsWithSurrogate (uint8_t state) |
static bool | StartsWithSurrogate (uint8_t state) |
static void | MergeLeafLeft (int *length, uint8_t *state, uint8_t leaf_state) |
static void | MergeLeafRight (int *length, uint8_t *state, uint8_t leaf_state) |
static void | MergeTerminal (int *length, uint8_t state, uint8_t *state_out) |
static int | Calculate (i::ConsString *current, uint8_t *state_out) |
static int | Calculate (i::ConsString *current) |
Static Public Attributes | |
static const uint8_t | kInitialState = 0 |
Private Member Functions | |
DISALLOW_IMPLICIT_CONSTRUCTORS (Utf8LengthHelper) | |
Enumerator | |
---|---|
kEndsWithLeadingSurrogate | |
kStartsWithTrailingSurrogate | |
kLeftmostEdgeIsCalculated | |
kRightmostEdgeIsCalculated | |
kLeftmostEdgeIsSurrogate | |
kRightmostEdgeIsSurrogate |
Definition at line 4370 of file api.cc.
|
inlinestatic |
Definition at line 4539 of file api.cc.
References Calculate(), and kInitialState.
|
inlinestatic |
Definition at line 4488 of file api.cc.
References v8::internal::ConsString::first(), kInitialState, v8::internal::String::length(), MergeLeafLeft(), MergeLeafRight(), MergeTerminal(), NULL, v8::internal::ConsString::second(), UNREACHABLE, and v8::Utf8LengthHelper::Visitor::VisitFlat().
Referenced by Calculate(), and v8::Utf8Length().
|
private |
|
inlinestatic |
Definition at line 4381 of file api.cc.
References kEndsWithLeadingSurrogate.
Referenced by MergeLeafLeft(), MergeLeafRight(), and MergeTerminal().
|
inlinestatic |
Definition at line 4439 of file api.cc.
References DCHECK, EndsWithSurrogate(), unibrow::Utf8::kBytesSavedByCombiningSurrogates, kEndsWithLeadingSurrogate, kLeftmostEdgeIsCalculated, kLeftmostEdgeIsSurrogate, and StartsWithSurrogate().
Referenced by Calculate().
|
inlinestatic |
Definition at line 4457 of file api.cc.
References DCHECK, EndsWithSurrogate(), unibrow::Utf8::kBytesSavedByCombiningSurrogates, kRightmostEdgeIsCalculated, kRightmostEdgeIsSurrogate, kStartsWithTrailingSurrogate, and StartsWithSurrogate().
Referenced by Calculate().
|
inlinestatic |
Definition at line 4475 of file api.cc.
References DCHECK, EndsWithSurrogate(), unibrow::Utf8::kBytesSavedByCombiningSurrogates, kEndsWithLeadingSurrogate, kInitialState, kLeftmostEdgeIsCalculated, kLeftmostEdgeIsSurrogate, kRightmostEdgeIsCalculated, kRightmostEdgeIsSurrogate, kStartsWithTrailingSurrogate, and StartsWithSurrogate().
Referenced by Calculate().
|
inlinestatic |
Definition at line 4385 of file api.cc.
References kStartsWithTrailingSurrogate.
Referenced by MergeLeafLeft(), MergeLeafRight(), and MergeTerminal().
|
static |
Definition at line 4379 of file api.cc.
Referenced by Calculate(), MergeTerminal(), and v8::Utf8LengthHelper::Visitor::VisitOneByteString().