V8 Project
v8::internal::ExternalTwoByteStringUtf16CharacterStream Class Reference

#include <scanner-character-streams.h>

+ Inheritance diagram for v8::internal::ExternalTwoByteStringUtf16CharacterStream:
+ Collaboration diagram for v8::internal::ExternalTwoByteStringUtf16CharacterStream:

Public Member Functions

 ExternalTwoByteStringUtf16CharacterStream (Handle< ExternalTwoByteString > data, int start_position, int end_position)
 
virtual ~ExternalTwoByteStringUtf16CharacterStream ()
 
virtual void PushBack (uc32 character)
 
- Public Member Functions inherited from v8::internal::Utf16CharacterStream
 Utf16CharacterStream ()
 
virtual ~Utf16CharacterStream ()
 
uc32 Advance ()
 
unsigned pos () const
 
unsigned SeekForward (unsigned code_unit_count)
 

Protected Member Functions

virtual unsigned SlowSeekForward (unsigned delta)
 
virtual bool ReadBlock ()
 

Protected Attributes

Handle< ExternalTwoByteStringsource_
 
const uc16raw_data_
 
- Protected Attributes inherited from v8::internal::Utf16CharacterStream
const uint16_t * buffer_cursor_
 
const uint16_t * buffer_end_
 
unsigned pos_
 

Additional Inherited Members

- Static Protected Attributes inherited from v8::internal::Utf16CharacterStream
static const uc32 kEndOfInput = -1
 

Detailed Description

Definition at line 120 of file scanner-character-streams.h.

Constructor & Destructor Documentation

◆ ExternalTwoByteStringUtf16CharacterStream()

v8::internal::ExternalTwoByteStringUtf16CharacterStream::ExternalTwoByteStringUtf16CharacterStream ( Handle< ExternalTwoByteString data,
int  start_position,
int  end_position 
)

Definition at line 438 of file scanner-character-streams.cc.

444  source_(data),
445  raw_data_(data->GetTwoByteData(start_position)) {
447  buffer_end_ = raw_data_ + (end_position - start_position);
448  pos_ = start_position;
449 }
const uint16_t * buffer_end_
Definition: scanner.h:103
const uint16_t * buffer_cursor_
Definition: scanner.h:102

◆ ~ExternalTwoByteStringUtf16CharacterStream()

v8::internal::ExternalTwoByteStringUtf16CharacterStream::~ExternalTwoByteStringUtf16CharacterStream ( )
virtual

Definition at line 434 of file scanner-character-streams.cc.

435 { }

Member Function Documentation

◆ PushBack()

virtual void v8::internal::ExternalTwoByteStringUtf16CharacterStream::PushBack ( uc32  character)
inlinevirtual

◆ ReadBlock()

virtual bool v8::internal::ExternalTwoByteStringUtf16CharacterStream::ReadBlock ( )
inlineprotectedvirtual

Implements v8::internal::Utf16CharacterStream.

Definition at line 138 of file scanner-character-streams.h.

138  {
139  // Entire string is read at start.
140  return false;
141  }

◆ SlowSeekForward()

virtual unsigned v8::internal::ExternalTwoByteStringUtf16CharacterStream::SlowSeekForward ( unsigned  delta)
inlineprotectedvirtual

Implements v8::internal::Utf16CharacterStream.

Definition at line 134 of file scanner-character-streams.h.

134  {
135  // Fast case always handles seeking.
136  return 0;
137  }

Member Data Documentation

◆ raw_data_

const uc16* v8::internal::ExternalTwoByteStringUtf16CharacterStream::raw_data_
protected

Definition at line 143 of file scanner-character-streams.h.

Referenced by PushBack().

◆ source_

Handle<ExternalTwoByteString> v8::internal::ExternalTwoByteStringUtf16CharacterStream::source_
protected

Definition at line 142 of file scanner-character-streams.h.


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