V8 Project
v8::internal::BoundsImpl< Config > Struct Template Reference

#include <types.h>

+ Inheritance diagram for v8::internal::BoundsImpl< Config >:
+ Collaboration diagram for v8::internal::BoundsImpl< Config >:

Public Types

typedef TypeImpl< Config > Type
 
typedef Type::TypeHandle TypeHandle
 
typedef Type::Region Region
 

Public Member Functions

 BoundsImpl ()
 
 BoundsImpl (TypeHandle t)
 
 BoundsImpl (TypeHandle l, TypeHandle u)
 
bool Narrows (BoundsImpl that)
 

Static Public Member Functions

static BoundsImpl Unbounded (Region *region)
 
static BoundsImpl Both (BoundsImpl b1, BoundsImpl b2, Region *region)
 
static BoundsImpl Either (BoundsImpl b1, BoundsImpl b2, Region *region)
 
static BoundsImpl NarrowLower (BoundsImpl b, TypeHandle t, Region *region)
 
static BoundsImpl NarrowUpper (BoundsImpl b, TypeHandle t, Region *region)
 

Public Attributes

TypeHandle lower
 
TypeHandle upper
 

Detailed Description

template<class Config>
struct v8::internal::BoundsImpl< Config >

Definition at line 995 of file types.h.

Member Typedef Documentation

◆ Region

template<class Config >
typedef Type::Region v8::internal::BoundsImpl< Config >::Region

Definition at line 998 of file types.h.

◆ Type

template<class Config >
typedef TypeImpl<Config> v8::internal::BoundsImpl< Config >::Type

Definition at line 996 of file types.h.

◆ TypeHandle

template<class Config >
typedef Type::TypeHandle v8::internal::BoundsImpl< Config >::TypeHandle

Definition at line 997 of file types.h.

Constructor & Destructor Documentation

◆ BoundsImpl() [1/3]

template<class Config >
v8::internal::BoundsImpl< Config >::BoundsImpl ( )
inline

Definition at line 1003 of file types.h.

1003 {}

◆ BoundsImpl() [2/3]

template<class Config >
v8::internal::BoundsImpl< Config >::BoundsImpl ( TypeHandle  t)
inlineexplicit

Definition at line 1004 of file types.h.

1004 : lower(t), upper(t) {}

◆ BoundsImpl() [3/3]

template<class Config >
v8::internal::BoundsImpl< Config >::BoundsImpl ( TypeHandle  l,
TypeHandle  u 
)
inline

Definition at line 1005 of file types.h.

1005  : lower(l), upper(u) {
1006  DCHECK(lower->Is(upper));
1007  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK.

Member Function Documentation

◆ Both()

template<class Config >
static BoundsImpl v8::internal::BoundsImpl< Config >::Both ( BoundsImpl< Config >  b1,
BoundsImpl< Config >  b2,
Region region 
)
inlinestatic

Definition at line 1015 of file types.h.

1015  {
1016  TypeHandle lower = Type::Union(b1.lower, b2.lower, region);
1017  TypeHandle upper = Type::Intersect(b1.upper, b2.upper, region);
1018  // Lower bounds are considered approximate, correct as necessary.
1019  lower = Type::Intersect(lower, upper, region);
1020  return BoundsImpl(lower, upper);
1021  }
static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region *reg)
Definition: types.cc:607
static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region *reg)
Definition: types.cc:737
Type::TypeHandle TypeHandle
Definition: types.h:997

References v8::internal::TypeImpl< ZoneTypeConfig >::Intersect(), v8::internal::BoundsImpl< Config >::lower, v8::internal::TypeImpl< ZoneTypeConfig >::Union(), and v8::internal::BoundsImpl< Config >::upper.

+ Here is the call graph for this function:

◆ Either()

template<class Config >
static BoundsImpl v8::internal::BoundsImpl< Config >::Either ( BoundsImpl< Config >  b1,
BoundsImpl< Config >  b2,
Region region 
)
inlinestatic

Definition at line 1024 of file types.h.

1024  {
1025  TypeHandle lower = Type::Intersect(b1.lower, b2.lower, region);
1026  TypeHandle upper = Type::Union(b1.upper, b2.upper, region);
1027  return BoundsImpl(lower, upper);
1028  }

References v8::internal::TypeImpl< ZoneTypeConfig >::Intersect(), v8::internal::BoundsImpl< Config >::lower, v8::internal::TypeImpl< ZoneTypeConfig >::Union(), and v8::internal::BoundsImpl< Config >::upper.

+ Here is the call graph for this function:

◆ NarrowLower()

template<class Config >
static BoundsImpl v8::internal::BoundsImpl< Config >::NarrowLower ( BoundsImpl< Config >  b,
TypeHandle  t,
Region region 
)
inlinestatic

Definition at line 1030 of file types.h.

1030  {
1031  // Lower bounds are considered approximate, correct as necessary.
1032  t = Type::Intersect(t, b.upper, region);
1033  TypeHandle lower = Type::Union(b.lower, t, region);
1034  return BoundsImpl(lower, b.upper);
1035  }

References v8::internal::TypeImpl< ZoneTypeConfig >::Intersect(), v8::internal::BoundsImpl< Config >::lower, v8::internal::TypeImpl< ZoneTypeConfig >::Union(), and v8::internal::BoundsImpl< Config >::upper.

+ Here is the call graph for this function:

◆ Narrows()

template<class Config >
bool v8::internal::BoundsImpl< Config >::Narrows ( BoundsImpl< Config >  that)
inline

Definition at line 1042 of file types.h.

1042  {
1043  return that.lower->Is(this->lower) && this->upper->Is(that.upper);
1044  }

References v8::internal::BoundsImpl< Config >::lower, and v8::internal::BoundsImpl< Config >::upper.

Referenced by v8::internal::compiler::Typer::NarrowVisitor::Pre(), and v8::internal::compiler::Typer::WidenVisitor::Pre().

+ Here is the caller graph for this function:

◆ NarrowUpper()

template<class Config >
static BoundsImpl v8::internal::BoundsImpl< Config >::NarrowUpper ( BoundsImpl< Config >  b,
TypeHandle  t,
Region region 
)
inlinestatic

Definition at line 1036 of file types.h.

1036  {
1037  TypeHandle lower = Type::Intersect(b.lower, t, region);
1038  TypeHandle upper = Type::Intersect(b.upper, t, region);
1039  return BoundsImpl(lower, upper);
1040  }

References v8::internal::TypeImpl< ZoneTypeConfig >::Intersect(), v8::internal::BoundsImpl< Config >::lower, and v8::internal::BoundsImpl< Config >::upper.

+ Here is the call graph for this function:

◆ Unbounded()

template<class Config >
static BoundsImpl v8::internal::BoundsImpl< Config >::Unbounded ( Region region)
inlinestatic

Definition at line 1010 of file types.h.

1010  {
1011  return BoundsImpl(Type::None(region), Type::Any(region));
1012  }
@ None
Definition: v8.h:2211

References v8::None.

Member Data Documentation

◆ lower

◆ upper


The documentation for this struct was generated from the following file: