#include <unicode.h>
|
void | Reset (uint16_t *buffer, unsigned buffer_length, const uint8_t *stream, unsigned stream_length) |
|
Definition at line 159 of file unicode.h.
◆ Utf8DecoderBase() [1/2]
unibrow::Utf8DecoderBase::Utf8DecoderBase |
( |
| ) |
|
|
inline |
Definition at line 156 of file unicode-inl.h.
bool last_byte_of_buffer_unused_
const uint8_t * unbuffered_start_
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
◆ Utf8DecoderBase() [2/2]
unibrow::Utf8DecoderBase::Utf8DecoderBase |
( |
uint16_t * |
buffer, |
|
|
unsigned |
buffer_length, |
|
|
const uint8_t * |
stream, |
|
|
unsigned |
stream_length |
|
) |
| |
|
inline |
Definition at line 161 of file unicode-inl.h.
165 Reset(buffer, buffer_length, stream, stream_length);
void Reset(uint16_t *buffer, unsigned buffer_length, const uint8_t *stream, unsigned stream_length)
References Reset().
◆ DISALLOW_COPY_AND_ASSIGN()
◆ Reset()
void unibrow::Utf8DecoderBase::Reset |
( |
uint16_t * |
buffer, |
|
|
unsigned |
buffer_length, |
|
|
const uint8_t * |
stream, |
|
|
unsigned |
stream_length |
|
) |
| |
|
protected |
Definition at line 261 of file unicode.cc.
268 bool writing_to_buffer =
true;
270 unsigned utf16_length = 0;
271 while (stream_length != 0) {
274 DCHECK(cursor > 0 && cursor <= stream_length);
276 stream_length -= cursor;
278 utf16_length += is_two_characters ? 2 : 1;
280 if (!writing_to_buffer)
continue;
283 if (utf16_length <= buffer_length) {
284 if (is_two_characters) {
288 *buffer++ = character;
290 if (utf16_length == buffer_length) {
292 writing_to_buffer =
false;
299 DCHECK(is_two_characters);
300 writing_to_buffer =
false;
static uint16_t LeadSurrogate(uint32_t char_code)
static const uchar kMaxNonSurrogateCharCode
static uint16_t TrailSurrogate(uint32_t char_code)
static uchar ValueOf(const byte *str, unsigned length, unsigned *cursor)
#define DCHECK(condition)
References DCHECK, unibrow::Utf16::kMaxNonSurrogateCharCode, last_byte_of_buffer_unused_, unibrow::Utf16::LeadSurrogate(), NULL, unibrow::Utf16::TrailSurrogate(), unbuffered_start_, utf16_length_, and unibrow::Utf8::ValueOf().
Referenced by unibrow::Utf8Decoder< kBufferSize >::Reset(), and Utf8DecoderBase().
◆ Utf16Length()
unsigned unibrow::Utf8DecoderBase::Utf16Length |
( |
| ) |
const |
|
inline |
◆ WriteUtf16Slow()
void unibrow::Utf8DecoderBase::WriteUtf16Slow |
( |
const uint8_t * |
stream, |
|
|
uint16_t * |
data, |
|
|
unsigned |
length |
|
) |
| |
|
staticprotected |
◆ last_byte_of_buffer_unused_
bool unibrow::Utf8DecoderBase::last_byte_of_buffer_unused_ |
|
protected |
◆ unbuffered_start_
const uint8_t* unibrow::Utf8DecoderBase::unbuffered_start_ |
|
protected |
◆ utf16_length_
unsigned unibrow::Utf8DecoderBase::utf16_length_ |
|
protected |
The documentation for this class was generated from the following files: