protected static void EmitChildWithConvert(ExpressionElement child, Type resultType, FleeILGenerator ilg, IServiceProvider services) { child.Emit(ilg, services); bool converted = ImplicitConverter.EmitImplicitConvert(child.ResultType, resultType, ilg); Debug.Assert(converted, "convert failed"); }
/// <summary> /// Set the left and right operands, get the operation, and get the result type /// </summary> /// <param name="leftChild"></param> /// <param name="rightChild"></param> /// <param name="op"></param> private void Configure(ExpressionElement leftChild, ExpressionElement rightChild, object op) { MyLeftChild = leftChild; MyRightChild = rightChild; this.GetOperation(op); this.ValidateInternal(op); }
public void SetChild(ExpressionElement child) { MyChild = child; _myResultType = this.GetResultType(child.ResultType); if (_myResultType == null) { base.ThrowCompileException(CompileErrorResourceKeys.OperationNotDefinedForType, CompileExceptionReason.TypeMismatch, MyChild.ResultType.Name); } }
protected static bool IsChildOfType(ExpressionElement child, Type t) { return(object.ReferenceEquals(child.ResultType, t)); }