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

#include <handler-table.h>

Collaboration diagram for v8::internal::HandlerTable:

Public Types

enum  CatchPrediction {
  UNCAUGHT , CAUGHT , PROMISE , ASYNC_AWAIT ,
  UNCAUGHT_ASYNC_AWAIT
}
 
enum  EncodingMode { kRangeBasedEncoding , kReturnAddressBasedEncoding }
 

Public Member Functions

 HandlerTable (Tagged< InstructionStream > code)
 
 HandlerTable (Tagged< Code > code)
 
 HandlerTable (Tagged< TrustedByteArray > byte_array)
 
 HandlerTable (Tagged< BytecodeArray > bytecode_array)
 
 HandlerTable (Address handler_table, int handler_table_size, EncodingMode encoding_mode)
 
int GetRangeStart (int index) const
 
int GetRangeEnd (int index) const
 
int GetRangeHandler (int index) const
 
int GetRangeData (int index) const
 
void SetRangeStart (int index, int value)
 
void SetRangeEnd (int index, int value)
 
void SetRangeHandler (int index, int offset, CatchPrediction pred)
 
void SetRangeData (int index, int value)
 
int LookupHandlerIndexForRange (int pc_offset) const
 
int LookupReturn (int pc_offset)
 
int NumberOfRangeEntries () const
 
int NumberOfReturnEntries () const
 
bool HandlerWasUsed (int index) const
 
void MarkHandlerUsed (int index)
 
CatchPrediction GetRangePrediction (int index) const
 

Static Public Member Functions

static int LengthForRange (int entries)
 
static int EmitReturnTableStart (Assembler *masm)
 
static void EmitReturnEntry (Assembler *masm, int offset, int handler)
 

Static Public Attributes

static const int kNoHandlerFound = -1
 
static const int kLazyDeopt = HandlerOffsetField::kMax
 

Private Types

using HandlerPredictionField = base::BitField<CatchPrediction, 0, 3>
 
using HandlerWasUsedField = HandlerPredictionField::Next<bool, 1>
 
using HandlerOffsetField = HandlerWasUsedField::Next<int, 28>
 

Private Member Functions

int GetRangeHandlerBitfield (int index) const
 
int GetReturnOffset (int index) const
 
int GetReturnHandler (int index) const
 

Static Private Member Functions

static int EntrySizeFromMode (EncodingMode mode)
 

Private Attributes

const int number_of_entries_
 
const Address raw_encoded_data_
 

Static Private Attributes

static const int kRangeStartIndex = 0
 
static const int kRangeEndIndex = 1
 
static const int kRangeHandlerIndex = 2
 
static const int kRangeDataIndex = 3
 
static const int kRangeEntrySize = 4
 
static const int kReturnOffsetIndex = 0
 
static const int kReturnHandlerIndex = 1
 
static const int kReturnEntrySize = 2
 

Detailed Description

Definition at line 37 of file handler-table.h.

Member Typedef Documentation

◆ HandlerOffsetField

◆ HandlerPredictionField

◆ HandlerWasUsedField

Member Enumeration Documentation

◆ CatchPrediction

Enumerator
UNCAUGHT 
CAUGHT 
PROMISE 
ASYNC_AWAIT 
UNCAUGHT_ASYNC_AWAIT 

Definition at line 42 of file handler-table.h.

◆ EncodingMode

Enumerator
kRangeBasedEncoding 
kReturnAddressBasedEncoding 

Definition at line 55 of file handler-table.h.

Constructor & Destructor Documentation

◆ HandlerTable() [1/5]

v8::internal::HandlerTable::HandlerTable ( Tagged< InstructionStream > code)
explicit

◆ HandlerTable() [2/5]

v8::internal::HandlerTable::HandlerTable ( Tagged< Code > code)
explicit

Definition at line 22 of file handler-table.cc.

◆ HandlerTable() [3/5]

v8::internal::HandlerTable::HandlerTable ( Tagged< TrustedByteArray > byte_array)
explicit

Definition at line 35 of file handler-table.cc.

◆ HandlerTable() [4/5]

v8::internal::HandlerTable::HandlerTable ( Tagged< BytecodeArray > bytecode_array)
explicit

Definition at line 32 of file handler-table.cc.

◆ HandlerTable() [5/5]

v8::internal::HandlerTable::HandlerTable ( Address handler_table,
int handler_table_size,
EncodingMode encoding_mode )

Definition at line 39 of file handler-table.cc.

Here is the call graph for this function:

Member Function Documentation

◆ EmitReturnEntry()

void v8::internal::HandlerTable::EmitReturnEntry ( Assembler * masm,
int offset,
int handler )
static

Definition at line 170 of file handler-table.cc.

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

◆ EmitReturnTableStart()

int v8::internal::HandlerTable::EmitReturnTableStart ( Assembler * masm)
static

Definition at line 162 of file handler-table.cc.

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

◆ EntrySizeFromMode()

int v8::internal::HandlerTable::EntrySizeFromMode ( EncodingMode mode)
staticprivate

Definition at line 57 of file handler-table.cc.

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

◆ GetRangeData()

int v8::internal::HandlerTable::GetRangeData ( int index) const

Definition at line 93 of file handler-table.cc.

Here is the call graph for this function:

◆ GetRangeEnd()

int v8::internal::HandlerTable::GetRangeEnd ( int index) const

Definition at line 74 of file handler-table.cc.

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

◆ GetRangeHandler()

int v8::internal::HandlerTable::GetRangeHandler ( int index) const

Definition at line 89 of file handler-table.cc.

Here is the call graph for this function:

◆ GetRangeHandlerBitfield()

int v8::internal::HandlerTable::GetRangeHandlerBitfield ( int index) const
private

Definition at line 81 of file handler-table.cc.

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

◆ GetRangePrediction()

HandlerTable::CatchPrediction v8::internal::HandlerTable::GetRangePrediction ( int index) const

Definition at line 100 of file handler-table.cc.

Here is the call graph for this function:

◆ GetRangeStart()

int v8::internal::HandlerTable::GetRangeStart ( int index) const

Definition at line 67 of file handler-table.cc.

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

◆ GetReturnHandler()

int v8::internal::HandlerTable::GetReturnHandler ( int index) const
private

Definition at line 124 of file handler-table.cc.

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

◆ GetReturnOffset()

int v8::internal::HandlerTable::GetReturnOffset ( int index) const
private

Definition at line 117 of file handler-table.cc.

Here is the call graph for this function:

◆ HandlerWasUsed()

bool v8::internal::HandlerTable::HandlerWasUsed ( int index) const

Definition at line 105 of file handler-table.cc.

Here is the call graph for this function:

◆ LengthForRange()

int v8::internal::HandlerTable::LengthForRange ( int entries)
static

Definition at line 157 of file handler-table.cc.

Here is the caller graph for this function:

◆ LookupHandlerIndexForRange()

int v8::internal::HandlerTable::LookupHandlerIndexForRange ( int pc_offset) const

Definition at line 185 of file handler-table.cc.

Here is the call graph for this function:

◆ LookupReturn()

int v8::internal::HandlerTable::LookupReturn ( int pc_offset)

Definition at line 209 of file handler-table.cc.

Here is the call graph for this function:

◆ MarkHandlerUsed()

void v8::internal::HandlerTable::MarkHandlerUsed ( int index)

Definition at line 109 of file handler-table.cc.

Here is the call graph for this function:

◆ NumberOfRangeEntries()

int v8::internal::HandlerTable::NumberOfRangeEntries ( ) const

Definition at line 175 of file handler-table.cc.

Here is the caller graph for this function:

◆ NumberOfReturnEntries()

int v8::internal::HandlerTable::NumberOfReturnEntries ( ) const

Definition at line 180 of file handler-table.cc.

Here is the caller graph for this function:

◆ SetRangeData()

void v8::internal::HandlerTable::SetRangeData ( int index,
int value )

Definition at line 151 of file handler-table.cc.

◆ SetRangeEnd()

void v8::internal::HandlerTable::SetRangeEnd ( int index,
int value )

Definition at line 137 of file handler-table.cc.

◆ SetRangeHandler()

void v8::internal::HandlerTable::SetRangeHandler ( int index,
int offset,
CatchPrediction pred )

Definition at line 142 of file handler-table.cc.

Here is the call graph for this function:

◆ SetRangeStart()

void v8::internal::HandlerTable::SetRangeStart ( int index,
int value )

Definition at line 132 of file handler-table.cc.

Member Data Documentation

◆ kLazyDeopt

const int v8::internal::HandlerTable::kLazyDeopt = HandlerOffsetField::kMax
static

Definition at line 154 of file handler-table.h.

◆ kNoHandlerFound

const int v8::internal::HandlerTable::kNoHandlerFound = -1
static

Definition at line 109 of file handler-table.h.

◆ kRangeDataIndex

const int v8::internal::HandlerTable::kRangeDataIndex = 3
staticprivate

Definition at line 140 of file handler-table.h.

◆ kRangeEndIndex

const int v8::internal::HandlerTable::kRangeEndIndex = 1
staticprivate

Definition at line 138 of file handler-table.h.

◆ kRangeEntrySize

const int v8::internal::HandlerTable::kRangeEntrySize = 4
staticprivate

Definition at line 141 of file handler-table.h.

◆ kRangeHandlerIndex

const int v8::internal::HandlerTable::kRangeHandlerIndex = 2
staticprivate

Definition at line 139 of file handler-table.h.

◆ kRangeStartIndex

const int v8::internal::HandlerTable::kRangeStartIndex = 0
staticprivate

Definition at line 137 of file handler-table.h.

◆ kReturnEntrySize

const int v8::internal::HandlerTable::kReturnEntrySize = 2
staticprivate

Definition at line 146 of file handler-table.h.

◆ kReturnHandlerIndex

const int v8::internal::HandlerTable::kReturnHandlerIndex = 1
staticprivate

Definition at line 145 of file handler-table.h.

◆ kReturnOffsetIndex

const int v8::internal::HandlerTable::kReturnOffsetIndex = 0
staticprivate

Definition at line 144 of file handler-table.h.

◆ number_of_entries_

const int v8::internal::HandlerTable::number_of_entries_
private

Definition at line 121 of file handler-table.h.

◆ raw_encoded_data_

const Address v8::internal::HandlerTable::raw_encoded_data_
private

Definition at line 133 of file handler-table.h.


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