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

#include <turbofan-types.h>

Collaboration diagram for v8::internal::compiler::Type:

Public Types

using bitset = BitsetType::bitset
 

Public Member Functions

 Type ()
 
bool IsNone () const
 
bool IsInvalid () const
 
bool Is (Type that) const
 
bool Maybe (Type that) const
 
bool Equals (Type that) const
 
bool IsBitset () const
 
bool IsRange () const
 
bool IsHeapConstant () const
 
bool IsOtherNumberConstant () const
 
bool IsTuple () const
 
bool IsSingleton () const
 
bool CanBeAsserted () const
 
Handle< TurbofanType > AllocateOnHeap (Factory *factory)
 
const HeapConstantTypeAsHeapConstant () const
 
const OtherNumberConstantTypeAsOtherNumberConstant () const
 
const RangeTypeAsRange () const
 
const TupleTypeAsTuple () const
 
double Min () const
 
double Max () const
 
Type GetRange () const
 
int NumConstants () const
 
bool operator== (Type other) const
 
bool operator!= (Type other) const
 
void PrintTo (std::ostream &os) const
 
bool IsUnionForTesting ()
 
bitset AsBitsetForTesting ()
 
const UnionTypeAsUnionForTesting ()
 
Type BitsetGlbForTesting ()
 
Type BitsetLubForTesting ()
 

Static Public Member Functions

static Type SignedSmall ()
 
static Type UnsignedSmall ()
 
static Type Constant (JSHeapBroker *broker, Handle< i::Object > value, Zone *zone)
 
static Type Constant (JSHeapBroker *broker, ObjectRef value, Zone *zone)
 
static Type Constant (double value, Zone *zone)
 
static Type Range (double min, double max, Zone *zone)
 
static Type Tuple (Type first, Type second, Type third, Zone *zone)
 
static Type Tuple (Type first, Type second, Zone *zone)
 
static Type Union (Type type1, Type type2, Zone *zone)
 
static Type Intersect (Type type1, Type type2, Zone *zone)
 
static Type For (MapRef type, JSHeapBroker *broker)
 
static Type Invalid ()
 

Private Member Functions

 Type (bitset bits)
 
 Type (TypeBase *type_base)
 
bool IsKind (TypeBase::Kind kind) const
 
const TypeBaseToTypeBase () const
 
bool IsAny () const
 
bool IsUnion () const
 
bitset AsBitset () const
 
const UnionTypeAsUnion () const
 
bitset BitsetGlb () const
 
bitset BitsetLub () const
 
bool SlowIs (Type that) const
 
bool SimplyEquals (Type that) const
 

Static Private Member Functions

static Type FromTypeBase (TypeBase *type)
 
static Type NewBitset (bitset bits)
 
static Type Range (RangeType::Limits lims, Zone *zone)
 
static Type OtherNumberConstant (double value, Zone *zone)
 
static Type HeapConstant (HeapObjectRef value, JSHeapBroker *broker, Zone *zone)
 
static bool Overlap (const RangeType *lhs, const RangeType *rhs)
 
static bool Contains (const RangeType *lhs, const RangeType *rhs)
 
static int UpdateRange (Type type, UnionType *result, int size, Zone *zone)
 
static RangeType::Limits IntersectRangeAndBitset (Type range, Type bits, Zone *zone)
 
static RangeType::Limits ToLimits (bitset bits, Zone *zone)
 
static int AddToUnion (Type type, UnionType *result, int size, Zone *zone)
 
static int IntersectAux (Type type, Type other, UnionType *result, int size, RangeType::Limits *limits, Zone *zone)
 
static Type NormalizeUnion (UnionType *unioned, int size, Zone *zone)
 
static Type NormalizeRangeAndBitset (Type range, bitset *bits, Zone *zone)
 

Private Attributes

friend BitsetType
 
friend UnionType
 
uint64_t payload_
 

Friends

template<class >
class Iterator
 
size_t hash_value (Type type)
 

Detailed Description

Definition at line 422 of file turbofan-types.h.

Member Typedef Documentation

◆ bitset

Constructor & Destructor Documentation

◆ Type() [1/3]

v8::internal::compiler::Type::Type ( )
inline

Definition at line 432 of file turbofan-types.h.

Here is the caller graph for this function:

◆ Type() [2/3]

v8::internal::compiler::Type::Type ( bitset bits)
inlineexplicitprivate

Definition at line 539 of file turbofan-types.h.

◆ Type() [3/3]

v8::internal::compiler::Type::Type ( TypeBase * type_base)
inlineprivate

Definition at line 541 of file turbofan-types.h.

Member Function Documentation

◆ AddToUnion()

int v8::internal::compiler::Type::AddToUnion ( Type type,
UnionType * result,
int size,
Zone * zone )
staticprivate

Definition at line 1007 of file turbofan-types.cc.

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

◆ AllocateOnHeap()

Handle< TurbofanType > v8::internal::compiler::Type::AllocateOnHeap ( Factory * factory)

Definition at line 1258 of file turbofan-types.cc.

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

◆ AsBitset()

bitset v8::internal::compiler::Type::AsBitset ( ) const
inlineprivate

Definition at line 559 of file turbofan-types.h.

Here is the caller graph for this function:

◆ AsBitsetForTesting()

bitset v8::internal::compiler::Type::AsBitsetForTesting ( )
inline

Definition at line 526 of file turbofan-types.h.

◆ AsHeapConstant()

const HeapConstantType * v8::internal::compiler::Type::AsHeapConstant ( ) const

Definition at line 1209 of file turbofan-types.cc.

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

◆ AsOtherNumberConstant()

const OtherNumberConstantType * v8::internal::compiler::Type::AsOtherNumberConstant ( ) const

Definition at line 1214 of file turbofan-types.cc.

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

◆ AsRange()

const RangeType * v8::internal::compiler::Type::AsRange ( ) const

Definition at line 1219 of file turbofan-types.cc.

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

◆ AsTuple()

const TupleType * v8::internal::compiler::Type::AsTuple ( ) const

Definition at line 1224 of file turbofan-types.cc.

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

◆ AsUnion()

const UnionType * v8::internal::compiler::Type::AsUnion ( ) const
private

Definition at line 1229 of file turbofan-types.cc.

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

◆ AsUnionForTesting()

const UnionType * v8::internal::compiler::Type::AsUnionForTesting ( )
inline

Definition at line 527 of file turbofan-types.h.

◆ BitsetGlb()

Type::bitset v8::internal::compiler::Type::BitsetGlb ( ) const
private

Definition at line 102 of file turbofan-types.cc.

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

◆ BitsetGlbForTesting()

Type v8::internal::compiler::Type::BitsetGlbForTesting ( )
inline

Definition at line 528 of file turbofan-types.h.

◆ BitsetLub()

Type::bitset v8::internal::compiler::Type::BitsetLub ( ) const
private

Definition at line 120 of file turbofan-types.cc.

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

◆ BitsetLubForTesting()

Type v8::internal::compiler::Type::BitsetLubForTesting ( )
inline

Definition at line 529 of file turbofan-types.h.

◆ CanBeAsserted()

bool v8::internal::compiler::Type::CanBeAsserted ( ) const
inline

Definition at line 487 of file turbofan-types.h.

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

◆ Constant() [1/3]

Type v8::internal::compiler::Type::Constant ( double value,
Zone * zone )
static

Definition at line 906 of file turbofan-types.cc.

Here is the call graph for this function:

◆ Constant() [2/3]

Type v8::internal::compiler::Type::Constant ( JSHeapBroker * broker,
Handle< i::Object > value,
Zone * zone )
static

Definition at line 919 of file turbofan-types.cc.

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

◆ Constant() [3/3]

Type v8::internal::compiler::Type::Constant ( JSHeapBroker * broker,
ObjectRef value,
Zone * zone )
static

Definition at line 931 of file turbofan-types.cc.

Here is the call graph for this function:

◆ Contains()

bool v8::internal::compiler::Type::Contains ( const RangeType * lhs,
const RangeType * rhs )
staticprivate

Definition at line 54 of file turbofan-types.cc.

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

◆ Equals()

bool v8::internal::compiler::Type::Equals ( Type that) const
inline

Definition at line 466 of file turbofan-types.h.

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

◆ For()

static Type v8::internal::compiler::Type::For ( MapRef type,
JSHeapBroker * broker )
inlinestatic

Definition at line 453 of file turbofan-types.h.

Here is the caller graph for this function:

◆ FromTypeBase()

static Type v8::internal::compiler::Type::FromTypeBase ( TypeBase * type)
inlinestaticprivate

Definition at line 554 of file turbofan-types.h.

Here is the caller graph for this function:

◆ GetRange()

Type v8::internal::compiler::Type::GetRange ( ) const

Definition at line 684 of file turbofan-types.cc.

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

◆ HeapConstant()

Type v8::internal::compiler::Type::HeapConstant ( HeapObjectRef value,
JSHeapBroker * broker,
Zone * zone )
staticprivate

Definition at line 1190 of file turbofan-types.cc.

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

◆ Intersect()

Type v8::internal::compiler::Type::Intersect ( Type type1,
Type type2,
Zone * zone )
static

Definition at line 723 of file turbofan-types.cc.

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

◆ IntersectAux()

int v8::internal::compiler::Type::IntersectAux ( Type type,
Type other,
UnionType * result,
int size,
RangeType::Limits * limits,
Zone * zone )
staticprivate

Definition at line 813 of file turbofan-types.cc.

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

◆ IntersectRangeAndBitset()

RangeType::Limits v8::internal::compiler::Type::IntersectRangeAndBitset ( Type range,
Type bits,
Zone * zone )
staticprivate

Definition at line 806 of file turbofan-types.cc.

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

◆ Invalid()

static Type v8::internal::compiler::Type::Invalid ( )
inlinestatic

Definition at line 511 of file turbofan-types.h.

◆ Is()

bool v8::internal::compiler::Type::Is ( Type that) const
inline

Definition at line 462 of file turbofan-types.h.

◆ IsAny()

bool v8::internal::compiler::Type::IsAny ( ) const
inlineprivate

Definition at line 556 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsBitset()

bool v8::internal::compiler::Type::IsBitset ( ) const
inline

Definition at line 469 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsHeapConstant()

bool v8::internal::compiler::Type::IsHeapConstant ( ) const
inline

Definition at line 471 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsInvalid()

bool v8::internal::compiler::Type::IsInvalid ( ) const
inline

Definition at line 460 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsKind()

bool v8::internal::compiler::Type::IsKind ( TypeBase::Kind kind) const
inlineprivate

Definition at line 545 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsNone()

bool v8::internal::compiler::Type::IsNone ( ) const
inline

Definition at line 459 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsOtherNumberConstant()

bool v8::internal::compiler::Type::IsOtherNumberConstant ( ) const
inline

Definition at line 472 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsRange()

bool v8::internal::compiler::Type::IsRange ( ) const
inline

Definition at line 470 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsSingleton()

bool v8::internal::compiler::Type::IsSingleton ( ) const
inline

Definition at line 480 of file turbofan-types.h.

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

◆ IsTuple()

bool v8::internal::compiler::Type::IsTuple ( ) const
inline

Definition at line 475 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsUnion()

bool v8::internal::compiler::Type::IsUnion ( ) const
inlineprivate

Definition at line 557 of file turbofan-types.h.

Here is the caller graph for this function:

◆ IsUnionForTesting()

bool v8::internal::compiler::Type::IsUnionForTesting ( )
inline

Definition at line 525 of file turbofan-types.h.

◆ Max()

double v8::internal::compiler::Type::Max ( ) const

Definition at line 80 of file turbofan-types.cc.

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

◆ Maybe()

bool v8::internal::compiler::Type::Maybe ( Type that) const

Definition at line 637 of file turbofan-types.cc.

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

◆ Min()

double v8::internal::compiler::Type::Min ( ) const

Definition at line 62 of file turbofan-types.cc.

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

◆ NewBitset()

static Type v8::internal::compiler::Type::NewBitset ( bitset bits)
inlinestaticprivate

Definition at line 571 of file turbofan-types.h.

Here is the caller graph for this function:

◆ NormalizeRangeAndBitset()

Type v8::internal::compiler::Type::NormalizeRangeAndBitset ( Type range,
bitset * bits,
Zone * zone )
staticprivate

Definition at line 865 of file turbofan-types.cc.

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

◆ NormalizeUnion()

Type v8::internal::compiler::Type::NormalizeUnion ( UnionType * unioned,
int size,
Zone * zone )
staticprivate

Definition at line 1022 of file turbofan-types.cc.

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

◆ NumConstants()

int v8::internal::compiler::Type::NumConstants ( ) const

Definition at line 1042 of file turbofan-types.cc.

Here is the call graph for this function:

◆ operator!=()

bool v8::internal::compiler::Type::operator!= ( Type other) const
inline

Definition at line 514 of file turbofan-types.h.

◆ operator==()

bool v8::internal::compiler::Type::operator== ( Type other) const
inline

Definition at line 513 of file turbofan-types.h.

◆ OtherNumberConstant()

Type v8::internal::compiler::Type::OtherNumberConstant ( double value,
Zone * zone )
staticprivate

Definition at line 1185 of file turbofan-types.cc.

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

◆ Overlap()

bool v8::internal::compiler::Type::Overlap ( const RangeType * lhs,
const RangeType * rhs )
staticprivate

Definition at line 47 of file turbofan-types.cc.

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

◆ PrintTo()

void v8::internal::compiler::Type::PrintTo ( std::ostream & os) const

Definition at line 1106 of file turbofan-types.cc.

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

◆ Range() [1/2]

Type v8::internal::compiler::Type::Range ( double min,
double max,
Zone * zone )
static

Definition at line 1200 of file turbofan-types.cc.

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

◆ Range() [2/2]

Type v8::internal::compiler::Type::Range ( RangeType::Limits lims,
Zone * zone )
staticprivate

Definition at line 1205 of file turbofan-types.cc.

Here is the call graph for this function:

◆ SignedSmall()

static Type v8::internal::compiler::Type::SignedSmall ( )
inlinestatic

Definition at line 434 of file turbofan-types.h.

Here is the caller graph for this function:

◆ SimplyEquals()

bool v8::internal::compiler::Type::SimplyEquals ( Type that) const
private

Definition at line 558 of file turbofan-types.cc.

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

◆ SlowIs()

bool v8::internal::compiler::Type::SlowIs ( Type that) const
private

Definition at line 589 of file turbofan-types.cc.

Here is the call graph for this function:

◆ ToLimits()

RangeType::Limits v8::internal::compiler::Type::ToLimits ( bitset bits,
Zone * zone )
staticprivate

Definition at line 795 of file turbofan-types.cc.

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

◆ ToTypeBase()

const TypeBase * v8::internal::compiler::Type::ToTypeBase ( ) const
inlineprivate

Definition at line 551 of file turbofan-types.h.

Here is the caller graph for this function:

◆ Tuple() [1/2]

Type v8::internal::compiler::Type::Tuple ( Type first,
Type second,
Type third,
Zone * zone )
static

Definition at line 1169 of file turbofan-types.cc.

Here is the call graph for this function:

◆ Tuple() [2/2]

Type v8::internal::compiler::Type::Tuple ( Type first,
Type second,
Zone * zone )
static

Definition at line 1177 of file turbofan-types.cc.

Here is the call graph for this function:

◆ Union()

Type v8::internal::compiler::Type::Union ( Type type1,
Type type2,
Zone * zone )
static

Definition at line 955 of file turbofan-types.cc.

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

◆ UnsignedSmall()

static Type v8::internal::compiler::Type::UnsignedSmall ( )
inlinestatic

Definition at line 435 of file turbofan-types.h.

Here is the caller graph for this function:

◆ UpdateRange()

int v8::internal::compiler::Type::UpdateRange ( Type type,
UnionType * result,
int size,
Zone * zone )
staticprivate

Definition at line 775 of file turbofan-types.cc.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ hash_value

size_t hash_value ( Type type)
friend

Definition at line 600 of file turbofan-types.h.

◆ Iterator

template<class >
friend class Iterator
friend

Definition at line 534 of file turbofan-types.h.

Member Data Documentation

◆ BitsetType

friend v8::internal::compiler::Type::BitsetType
private

Definition at line 535 of file turbofan-types.h.

◆ payload_

uint64_t v8::internal::compiler::Type::payload_
private

Definition at line 597 of file turbofan-types.h.

◆ UnionType

friend v8::internal::compiler::Type::UnionType
private

Definition at line 536 of file turbofan-types.h.


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