protected override IElement VisitVariableAssignment(VariableAssignmentElement assignment) { assignment = (VariableAssignmentElement)base.VisitVariableAssignment(assignment); if (!inlineable.Contains(assignment.VariableIndex)) return assignment; values.Add(assignment.VariableIndex, assignment.Value); return null; }
protected override IElement VisitVariableAssignment(VariableAssignmentElement assignment) { if (variableIndexPredicate(assignment.VariableIndex)) { var details = GetDetails(assignment.VariableIndex); details.AssignmentCount += 1; details.Trivial = details.Trivial && IsTrivial(assignment.Value); } return base.VisitVariableAssignment(assignment); }
protected virtual IElement VisitVariableAssignment(VariableAssignmentElement assignment) { assignment.Value = this.Visit(assignment.Value); return(assignment); }