Esempio n. 1
0
 public abstract void TransformGraph(LVertex v);
Esempio n. 2
0
 public abstract void GenerateCode(LVertex v, CodeBuilder builder);
Esempio n. 3
0
        private void Build(LVertex v)
        {
            foreach (var arg in v.Exp.Arguments)
            {
                if (arg.NodeType != ExpressionType.Quote)
                    continue;

                var uexp = arg as UnaryExpression;
                if (uexp.Operand.NodeType != ExpressionType.Lambda)
                    continue;

                var lexp = uexp.Operand as LambdaExpression;
                if (lexp.Parameters.Count > 0 && lexp.Parameters[0].Type.IsSymbol() && lexp.Body.NodeType == ExpressionType.Call)
                {
                    // nothing to do, other LVertex will handle it
                }
                else
                {
                    Visit(lexp);

                    v.Instructions.Add(lexp, _insts.ToArray());

                    _indexedInsts.Clear();
                    _insts.Clear();
                    _parameters.Clear();
                }
            }
        }