Inference/src/CodeGeneration/ILCodeGenerator.cs
/// <summary>
/// Writes the 'token' of call instructions.
/// </summary>
/// <param name="memberType">Member type.</param>
/// <param name="obj">Object to access to the member.</param> (null when the implicit object is a fresh type variable)
/// <param name="member">Member to call.</param>
/// <param name="setProperty">True if it is a set property. False if it is a get property.</param>
Writes the 'token' of call instructions.
Writes the ' token ' of call instructions .
private void WriteCall(PropertyType memberType, TypeExpression obj, string member, bool setProperty) {
            if (IsInstance(memberType))
                this.output.Write("instance ");
            string memberILType = memberType == null ? "object" : memberType.PropertyTypeExpression.ILType();
            string klass = TypeMapping.Instance.GetBCLName(obj.ILType(), true);
            if (setProperty)
                this.ilStamentsCodeGeneration.Write("void {0}::set_{1}({2})", klass, member, memberILType);
            else
                this.ilStamentsCodeGeneration.Write("{0} {1}::get_{2}()", memberILType, klass, member);
        }
private void WriteCall ( PropertyType memberType , TypeExpression obj , string member , bool setProperty ) { if ( IsInstance ( memberType ) ) this . output . Write ( " " ) ; string memberILType = memberType == null ? " " : memberType . PropertyTypeExpression . ILType ( ) ; string klass = TypeMapping . Instance . GetBCLName ( obj . ILType ( ) , true ) ; if ( setProperty ) this . ilStamentsCodeGeneration . Write ( " " , klass , member , memberILType ) ; else this . ilStamentsCodeGeneration . Write ( " " , memberILType , klass , member ) ; }
Writes the 'token' of call instructions.
Writes the ' token ' of call instructions .
memberType
PropertyType
None
obj
TypeExpression
Object to access to the member.
Object to access to the member .
member
string
Member to call.
Member to call .
setProperty
bool
True if it is a set property. False if it is a get property.
True if it is a set property . False if it is a get property .