v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::AsmJsScanner Class Reference

#include <asm-scanner.h>

Collaboration diagram for v8::internal::AsmJsScanner:

Public Types

enum  { kLocalsStart = -10000 , kGlobalsStart = 256 }
 
using token_t = int32_t
 

Public Member Functions

 AsmJsScanner (Utf16CharacterStream *stream)
 
token_t Token () const
 
size_t Position () const
 
void Next ()
 
void Rewind ()
 
const std::string & GetIdentifierString () const
 
bool IsPrecededByNewline () const
 
void Seek (size_t pos)
 
void EnterLocalScope ()
 
void EnterGlobalScope ()
 
void ResetLocals ()
 
bool IsLocal () const
 
bool IsGlobal () const
 
bool IsUnsigned () const
 
uint32_t AsUnsigned () const
 
bool IsDouble () const
 
double AsDouble () const
 

Static Public Member Functions

static bool IsLocal (token_t token)
 
static bool IsGlobal (token_t token)
 
static size_t LocalIndex (token_t token)
 
static size_t GlobalIndex (token_t token)
 

Static Public Attributes

static constexpr base::uc32 kEndOfInputU
 

Private Member Functions

void ConsumeIdentifier (base::uc32 ch)
 
void ConsumeNumber (base::uc32 ch)
 
bool ConsumeCComment ()
 
void ConsumeCPPComment ()
 
void ConsumeString (base::uc32 quote)
 
void ConsumeCompareOrShift (base::uc32 ch)
 
bool IsIdentifierStart (base::uc32 ch)
 
bool IsIdentifierPart (base::uc32 ch)
 
bool IsNumberStart (base::uc32 ch)
 

Private Attributes

Utf16CharacterStreamstream_
 
token_t token_
 
token_t preceding_token_
 
token_t next_token_
 
size_t position_
 
size_t preceding_position_
 
size_t next_position_
 
bool rewind_
 
std::string identifier_string_
 
bool in_local_scope_
 
std::unordered_map< std::string, token_tlocal_names_
 
std::unordered_map< std::string, token_tglobal_names_
 
std::unordered_map< std::string, token_tproperty_names_
 
int global_count_
 
double double_value_
 
uint32_t unsigned_value_
 
bool preceded_by_newline_
 

Detailed Description

Definition at line 30 of file asm-scanner.h.

Member Typedef Documentation

◆ token_t

Definition at line 32 of file asm-scanner.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kLocalsStart 
kGlobalsStart 

Definition at line 108 of file asm-scanner.h.

Constructor & Destructor Documentation

◆ AsmJsScanner()

v8::internal::AsmJsScanner::AsmJsScanner ( Utf16CharacterStream * stream)
explicit

Definition at line 24 of file asm-scanner.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AsDouble()

double v8::internal::AsmJsScanner::AsDouble ( ) const
inline

Definition at line 102 of file asm-scanner.h.

Here is the caller graph for this function:

◆ AsUnsigned()

uint32_t v8::internal::AsmJsScanner::AsUnsigned ( ) const
inline

Definition at line 97 of file asm-scanner.h.

Here is the caller graph for this function:

◆ ConsumeCComment()

bool v8::internal::AsmJsScanner::ConsumeCComment ( )
private

Definition at line 383 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeCompareOrShift()

void v8::internal::AsmJsScanner::ConsumeCompareOrShift ( base::uc32 ch)
private

Definition at line 430 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeCPPComment()

void v8::internal::AsmJsScanner::ConsumeCPPComment ( )
private

Definition at line 401 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeIdentifier()

void v8::internal::AsmJsScanner::ConsumeIdentifier ( base::uc32 ch)
private

Definition at line 227 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeNumber()

void v8::internal::AsmJsScanner::ConsumeNumber ( base::uc32 ch)
private

Definition at line 282 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeString()

void v8::internal::AsmJsScanner::ConsumeString ( base::uc32 quote)
private

Definition at line 414 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnterGlobalScope()

void v8::internal::AsmJsScanner::EnterGlobalScope ( )
inline

Definition at line 73 of file asm-scanner.h.

Here is the caller graph for this function:

◆ EnterLocalScope()

void v8::internal::AsmJsScanner::EnterLocalScope ( )
inline

Definition at line 72 of file asm-scanner.h.

Here is the caller graph for this function:

◆ GetIdentifierString()

const std::string & v8::internal::AsmJsScanner::GetIdentifierString ( ) const
inline

Definition at line 47 of file asm-scanner.h.

Here is the caller graph for this function:

◆ GlobalIndex()

static size_t v8::internal::AsmJsScanner::GlobalIndex ( token_t token)
inlinestatic

Definition at line 88 of file asm-scanner.h.

Here is the caller graph for this function:

◆ IsDouble()

bool v8::internal::AsmJsScanner::IsDouble ( ) const
inline

Definition at line 101 of file asm-scanner.h.

Here is the caller graph for this function:

◆ IsGlobal() [1/2]

bool v8::internal::AsmJsScanner::IsGlobal ( ) const
inline

Definition at line 79 of file asm-scanner.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsGlobal() [2/2]

static bool v8::internal::AsmJsScanner::IsGlobal ( token_t token)
inlinestatic

Definition at line 81 of file asm-scanner.h.

◆ IsIdentifierPart()

bool v8::internal::AsmJsScanner::IsIdentifierPart ( base::uc32 ch)
private

Definition at line 469 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsIdentifierStart()

bool v8::internal::AsmJsScanner::IsIdentifierStart ( base::uc32 ch)
private

Definition at line 464 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLocal() [1/2]

bool v8::internal::AsmJsScanner::IsLocal ( ) const
inline

Definition at line 78 of file asm-scanner.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLocal() [2/2]

static bool v8::internal::AsmJsScanner::IsLocal ( token_t token)
inlinestatic

Definition at line 80 of file asm-scanner.h.

◆ IsNumberStart()

bool v8::internal::AsmJsScanner::IsNumberStart ( base::uc32 ch)
private

Definition at line 473 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsPrecededByNewline()

bool v8::internal::AsmJsScanner::IsPrecededByNewline ( ) const
inline

Definition at line 54 of file asm-scanner.h.

Here is the caller graph for this function:

◆ IsUnsigned()

bool v8::internal::AsmJsScanner::IsUnsigned ( ) const
inline

Definition at line 96 of file asm-scanner.h.

Here is the caller graph for this function:

◆ LocalIndex()

static size_t v8::internal::AsmJsScanner::LocalIndex ( token_t token)
inlinestatic

Definition at line 84 of file asm-scanner.h.

Here is the caller graph for this function:

◆ Next()

void v8::internal::AsmJsScanner::Next ( )

Definition at line 54 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Position()

size_t v8::internal::AsmJsScanner::Position ( ) const
inline

Definition at line 39 of file asm-scanner.h.

Here is the caller graph for this function:

◆ ResetLocals()

void v8::internal::AsmJsScanner::ResetLocals ( )

Definition at line 174 of file asm-scanner.cc.

Here is the caller graph for this function:

◆ Rewind()

void v8::internal::AsmJsScanner::Rewind ( )

Definition at line 158 of file asm-scanner.cc.

Here is the caller graph for this function:

◆ Seek()

void v8::internal::AsmJsScanner::Seek ( size_t pos)

Definition at line 215 of file asm-scanner.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Token()

token_t v8::internal::AsmJsScanner::Token ( ) const
inline

Definition at line 37 of file asm-scanner.h.

Here is the caller graph for this function:

Member Data Documentation

◆ double_value_

double v8::internal::AsmJsScanner::double_value_
private

Definition at line 156 of file asm-scanner.h.

◆ global_count_

int v8::internal::AsmJsScanner::global_count_
private

Definition at line 155 of file asm-scanner.h.

◆ global_names_

std::unordered_map<std::string, token_t> v8::internal::AsmJsScanner::global_names_
private

Definition at line 153 of file asm-scanner.h.

◆ identifier_string_

std::string v8::internal::AsmJsScanner::identifier_string_
private

Definition at line 150 of file asm-scanner.h.

◆ in_local_scope_

bool v8::internal::AsmJsScanner::in_local_scope_
private

Definition at line 151 of file asm-scanner.h.

◆ kEndOfInputU

base::uc32 v8::internal::AsmJsScanner::kEndOfInputU
staticconstexpr
Initial value:
=
static_cast<base::uc32>(kEndOfInput)
uint32_t uc32
Definition strings.h:19

Definition at line 138 of file asm-scanner.h.

◆ local_names_

std::unordered_map<std::string, token_t> v8::internal::AsmJsScanner::local_names_
private

Definition at line 152 of file asm-scanner.h.

◆ next_position_

size_t v8::internal::AsmJsScanner::next_position_
private

Definition at line 148 of file asm-scanner.h.

◆ next_token_

token_t v8::internal::AsmJsScanner::next_token_
private

Definition at line 145 of file asm-scanner.h.

◆ position_

size_t v8::internal::AsmJsScanner::position_
private

Definition at line 146 of file asm-scanner.h.

◆ preceded_by_newline_

bool v8::internal::AsmJsScanner::preceded_by_newline_
private

Definition at line 158 of file asm-scanner.h.

◆ preceding_position_

size_t v8::internal::AsmJsScanner::preceding_position_
private

Definition at line 147 of file asm-scanner.h.

◆ preceding_token_

token_t v8::internal::AsmJsScanner::preceding_token_
private

Definition at line 144 of file asm-scanner.h.

◆ property_names_

std::unordered_map<std::string, token_t> v8::internal::AsmJsScanner::property_names_
private

Definition at line 154 of file asm-scanner.h.

◆ rewind_

bool v8::internal::AsmJsScanner::rewind_
private

Definition at line 149 of file asm-scanner.h.

◆ stream_

Utf16CharacterStream* v8::internal::AsmJsScanner::stream_
private

Definition at line 142 of file asm-scanner.h.

◆ token_

token_t v8::internal::AsmJsScanner::token_
private

Definition at line 143 of file asm-scanner.h.

◆ unsigned_value_

uint32_t v8::internal::AsmJsScanner::unsigned_value_
private

Definition at line 157 of file asm-scanner.h.


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