コード例 #1
0
ファイル: OperatorTransformer.cs プロジェクト: ykwd/rDSN
 public abstract void TransformGraph(LVertex v);
コード例 #2
0
ファイル: OperatorTransformer.cs プロジェクト: ykwd/rDSN
 public abstract void GenerateCode(LVertex v, CodeBuilder builder);
コード例 #3
0
ファイル: BasicBlockBuilder.cs プロジェクト: xornand/rDSN
        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();
                }
            }
        }