public ListAppendBoundBuiltinMethodInfo(ListInfo list, BuiltinMethodInfo method) : base(method) { _list = list; }
public ListPopBoundBuiltinMethodInfo(ListInfo list, BuiltinMethodInfo method) : base(method) { _list = list; }
private ISet<Namespace> MakeSequence(ExpressionEvaluator ee, Node node) { ISet<Namespace> result; if (!ee.GlobalScope.NodeVariables.TryGetValue(node, out result)) { var seqItems = ((SequenceExpression)node).Items; var indexValues = new ISet<Namespace>[seqItems.Count]; for (int i = 0; i < seqItems.Count; i++) { indexValues[i] = Evaluate(seqItems[i]); } ISet<Namespace> sequence; if (node is ListExpression) { sequence = new ListInfo(indexValues, _unit.ProjectState._listType).SelfSet; } else { Debug.Assert(node is TupleExpression); sequence = new SequenceInfo(indexValues, _unit.ProjectState._tupleType).SelfSet; } ee.GlobalScope.NodeVariables[node] = result = sequence; } return result; }