示例#1
0
        protected internal static CodegenExpression MakeEvaluate(
            AccessEvaluationType evaluationType,
            ExprTableAccessNode accessNode,
            Type resultType,
            CodegenMethodScope parent,
            ExprForgeCodegenSymbol symbols,
            CodegenClassScope classScope)
        {
            if (accessNode.TableAccessNumber == -1) {
                throw new IllegalStateException("Table expression node has not been assigned");
            }

            var method = parent.MakeChild(resultType, typeof(ExprTableAccessNode), classScope);

            CodegenExpression eps = symbols.GetAddEPS(method);
            var newData = symbols.GetAddIsNewData(method);
            CodegenExpression evalCtx = symbols.GetAddExprEvalCtx(method);

            var future = classScope.NamespaceScope.AddOrGetDefaultFieldWellKnown(
                new CodegenFieldNameTableAccess(accessNode.TableAccessNumber),
                typeof(ExprTableEvalStrategy));
            var evaluation = ExprDotMethod(future, evaluationType.MethodName, eps, newData, evalCtx);
            if (resultType != typeof(object)) {
                evaluation = CodegenLegoCast.CastSafeFromObjectType(resultType, evaluation);
                //evaluation = Cast(resultType, evaluation);
            }

            method.Block.MethodReturn(evaluation);
            return LocalMethod(method);
        }
示例#2
0
        protected override bool EqualsNodeInternal(ExprTableAccessNode other)
        {
            var that = (ExprTableAccessNodeSubpropAccessor) other;
            if (!SubpropName.Equals(that.SubpropName)) {
                return false;
            }

            return ExprNodeUtilityCompare.DeepEquals(
                aggregateAccessMultiValueNode,
                that.aggregateAccessMultiValueNode,
                false);
        }
示例#3
0
 protected abstract bool EqualsNodeInternal(ExprTableAccessNode other);
示例#4
0
 protected override bool EqualsNodeInternal(ExprTableAccessNode other)
 {
     return true;
 }