V8 Project
v8::internal::EffectsMixin< Var, Base, Effects > Class Template Reference

#include <effects.h>

+ Inheritance diagram for v8::internal::EffectsMixin< Var, Base, Effects >:
+ Collaboration diagram for v8::internal::EffectsMixin< Var, Base, Effects >:

Classes

struct  AltMerger
 
struct  AltWeakener
 
struct  Overrider
 
struct  SeqMerger
 

Public Member Functions

 EffectsMixin (Zone *zone)
 
Effect Lookup (Var var)
 
Bounds LookupBounds (Var var)
 
void Seq (Var var, Effect effect)
 
void Seq (Effects that)
 
void Alt (Var var, Effect effect)
 
void Alt (Effects that)
 
void Forget ()
 

Protected Types

typedef Base::Locator Locator
 

Detailed Description

template<class Var, class Base, class Effects>
class v8::internal::EffectsMixin< Var, Base, Effects >

Definition at line 79 of file effects.h.

Member Typedef Documentation

◆ Locator

template<class Var , class Base , class Effects >
typedef Base::Locator v8::internal::EffectsMixin< Var, Base, Effects >::Locator
protected

Definition at line 134 of file effects.h.

Constructor & Destructor Documentation

◆ EffectsMixin()

template<class Var , class Base , class Effects >
v8::internal::EffectsMixin< Var, Base, Effects >::EffectsMixin ( Zone zone)
inlineexplicit

Definition at line 81 of file effects.h.

81 : Base(zone) {}

Member Function Documentation

◆ Alt() [1/2]

template<class Var , class Base , class Effects >
void v8::internal::EffectsMixin< Var, Base, Effects >::Alt ( Effects  that)
inline

Definition at line 118 of file effects.h.

118  {
119  AltWeakener<EffectsMixin> weaken = { *this, that };
120  this->ForEach(&weaken);
121  AltMerger<EffectsMixin> merge = { *this };
122  that.ForEach(&merge);
123  }

References v8::internal::EffectsBase< Var, kNoVar >::ForEach().

+ Here is the call graph for this function:

◆ Alt() [2/2]

template<class Var , class Base , class Effects >
void v8::internal::EffectsMixin< Var, Base, Effects >::Alt ( Var  var,
Effect  effect 
)
inline

Definition at line 110 of file effects.h.

110  {
111  Locator locator;
112  if (!this->Insert(var, &locator)) {
113  effect = Effect::Alt(locator.value(), effect, Base::zone());
114  }
115  locator.set_value(effect);
116  }
Base::Locator Locator
Definition: effects.h:134
static Effect Alt(Effect e1, Effect e2, Zone *zone)
Definition: effects.h:54

References v8::internal::Effect::Alt().

+ Here is the call graph for this function:

◆ Forget()

template<class Var , class Base , class Effects >
void v8::internal::EffectsMixin< Var, Base, Effects >::Forget ( )
inline

Definition at line 126 of file effects.h.

126  {
127  Overrider override = {
128  Effect::Forget(Base::zone()), Effects(Base::zone()) };
129  this->ForEach(&override);
130  Seq(override.effects);
131  }
void Seq(Var var, Effect effect)
Definition: effects.h:96
static Effect Forget(Zone *zone)
Definition: effects.h:43

References v8::internal::Effect::Forget(), and v8::internal::EffectsMixin< Var, Base, Effects >::Seq().

+ Here is the call graph for this function:

◆ Lookup()

template<class Var , class Base , class Effects >
Effect v8::internal::EffectsMixin< Var, Base, Effects >::Lookup ( Var  var)
inline

Definition at line 83 of file effects.h.

83  {
84  Locator locator;
85  return this->Find(var, &locator)
86  ? locator.value() : Effect::Unknown(Base::zone());
87  }
static Effect Unknown(Zone *zone)
Definition: effects.h:39

References v8::internal::Effect::Unknown().

Referenced by v8::internal::EffectsMixin< Var, Base, Effects >::LookupBounds().

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

◆ LookupBounds()

template<class Var , class Base , class Effects >
Bounds v8::internal::EffectsMixin< Var, Base, Effects >::LookupBounds ( Var  var)
inline

Definition at line 89 of file effects.h.

89  {
90  Effect effect = Lookup(var);
91  return effect.modality == Effect::DEFINITE
92  ? effect.bounds : Bounds::Unbounded(Base::zone());
93  }
Effect Lookup(Var var)
Definition: effects.h:83
static BoundsImpl Unbounded(Region *region)
Definition: types.h:1010

References v8::internal::Effect::bounds, v8::internal::Effect::DEFINITE, v8::internal::EffectsMixin< Var, Base, Effects >::Lookup(), v8::internal::Effect::modality, and v8::internal::BoundsImpl< ZoneTypeConfig >::Unbounded().

Referenced by v8::internal::AstTyper::ObserveTypesAtOsrEntry().

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

◆ Seq() [1/2]

template<class Var , class Base , class Effects >
void v8::internal::EffectsMixin< Var, Base, Effects >::Seq ( Effects  that)
inline

Definition at line 104 of file effects.h.

104  {
105  SeqMerger<EffectsMixin> merge = { *this };
106  that.ForEach(&merge);
107  }

References v8::internal::EffectsBase< Var, kNoVar >::ForEach().

+ Here is the call graph for this function:

◆ Seq() [2/2]

template<class Var , class Base , class Effects >
void v8::internal::EffectsMixin< Var, Base, Effects >::Seq ( Var  var,
Effect  effect 
)
inline

Definition at line 96 of file effects.h.

96  {
97  Locator locator;
98  if (!this->Insert(var, &locator)) {
99  effect = Effect::Seq(locator.value(), effect, Base::zone());
100  }
101  locator.set_value(effect);
102  }
static Effect Seq(Effect e1, Effect e2, Zone *zone)
Definition: effects.h:48

References v8::internal::Effect::Seq().

Referenced by v8::internal::EffectsMixin< Var, Base, Effects >::Overrider::Call(), v8::internal::EffectsMixin< Var, Base, Effects >::Forget(), and v8::internal::AstTyper::ObserveTypesAtOsrEntry().

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

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