this.else_ = else_;
}
- public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
- condition.collectRefs(allRefs, refs);
- then_.collectRefs(allRefs, refs);
- if(else_ != null)
- else_.collectRefs(allRefs, refs);
- }
-
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars,
- TIntHashSet vars) {
- condition.collectVars(allVars, vars);
+ @Override
+ public void collectVars(TObjectIntHashMap<Variable> allVars,
+ TIntHashSet vars) {
+ condition.collectVars(allVars, vars);
then_.collectVars(allVars, vars);
if(else_ != null)
else_.collectVars(allVars, vars);
- }
+ }
- @Override
- protected void updateType() throws MatchException {
- setType(then_.getType());
- }
-
- @Override
- public IVal toVal(CompilationContext context, CodeWriter w) {
+ @Override
+ protected void updateType() throws MatchException {
+ setType(then_.getType());
+ }
+
+ @Override
+ public IVal toVal(CompilationContext context, CodeWriter w) {
IVal conditionVal = condition.toVal(context, w);
CodeWriter joinPoint = w.createBlock(getType());
CodeWriter thenBlock = w.createBlock();