Lines Matching refs:Effect

29 struct Effect {  struct
35 Effect() : modality(DEFINITE) {} in Effect() argument
36 explicit Effect(Bounds b, Modality m = DEFINITE) : modality(m), bounds(b) {} in modality() argument
39 static Effect Unknown(Zone* zone) { in Unknown() argument
40 return Effect(Bounds::Unbounded(zone), POSSIBLE); in Unknown()
43 static Effect Forget(Zone* zone) { in Forget() argument
44 return Effect(Bounds::Unbounded(zone), DEFINITE); in Forget()
48 static Effect Seq(Effect e1, Effect e2, Zone* zone) { in Seq() argument
50 return Effect(Bounds::Either(e1.bounds, e2.bounds, zone), e1.modality); in Seq()
54 static Effect Alt(Effect e1, Effect e2, Zone* zone) { in Alt() argument
55 return Effect( in Alt()
83 Effect Lookup(Var var) { in Lookup()
86 ? locator.value() : Effect::Unknown(Base::zone()); in Lookup()
90 Effect effect = Lookup(var); in LookupBounds()
91 return effect.modality == Effect::DEFINITE in LookupBounds()
96 void Seq(Var var, Effect effect) { in Seq()
99 effect = Effect::Seq(locator.value(), effect, Base::zone()); in Seq()
110 void Alt(Var var, Effect effect) { in Alt()
113 effect = Effect::Alt(locator.value(), effect, Base::zone()); in Alt()
128 Effect::Forget(Base::zone()), Effects(Base::zone()) }; in Forget()
138 void Call(Var var, Effect effect) { self.Seq(var, effect); } in Call()
144 void Call(Var var, Effect effect) { self.Alt(var, effect); } in Call()
150 void Call(Var var, Effect effect) { in Call()
151 if (effect.modality == Effect::DEFINITE && !other.Contains(var)) { in Call()
152 effect.modality = Effect::POSSIBLE; in Call()
163 void Call(Var var, Effect effect) { effects.Seq(var, new_effect); } in Call()
164 Effect new_effect;
189 typedef Effect Value;
191 static Effect NoValue() { return Effect(); } in NoValue()