protected virtual void VisitArgs(MethodCallValue value) { IComparisonOperand[] args = value.Args; for (int i = 0; i < args.Length; ++i) { args[i].Accept(this); } }
protected virtual void VisitArgs(MethodCallValue value) { var args = value.Args; for (var i = 0; i < args.Length; ++i) { args[i].Accept(this); } }
private object[] Args(MethodCallValue operand) { IComparisonOperand[] args = operand.Args; object[] @params = new object[args.Length]; for (int paramIdx = 0; paramIdx < args.Length; paramIdx++) { args[paramIdx].Accept(this); @params[paramIdx] = _value; } return(@params); }
private object[] Args(MethodCallValue operand) { var args = operand.Args; var @params = new object[args.Length]; for (var paramIdx = 0; paramIdx < args.Length; paramIdx++) { args[paramIdx].Accept(this); @params[paramIdx] = _value; } return(@params); }
public void Visit(MethodCallValue operand) { operand.Parent().Accept(this); object receiver = _value; MethodInfo method = _resolver.Resolve(operand.Method); try { _value = method.Invoke(IsStatic(method) ? null : receiver, Args(operand)); } catch (Exception exc) { Sharpen.Runtime.PrintStackTrace(exc); _value = null; } }
public virtual void Visit(MethodCallValue operand) { IMethodRef method = operand.Method; ITypeRef retType = method.ReturnType; // FIXME: this should be handled within conversions bool needConversion = retType.IsPrimitive; operand.Parent().Accept(this); bool oldInArithmetic = _inArithmetic; for (int paramIdx = 0; paramIdx < operand.Args.Length; paramIdx++) { _inArithmetic = operand.Method.ParamTypes[paramIdx].IsPrimitive; operand.Args[paramIdx].Accept(this); } _inArithmetic = oldInArithmetic; _methodBuilder.Invoke(method, operand.CallingConvention); Box(retType, !_inArithmetic && needConversion); }
public virtual void Visit(MethodCallValue value) { value.Parent().Accept(this); VisitArgs(value); }
public virtual void Visit(MethodCallValue operand) { _clazz = operand.Method.ReturnType; }
public virtual void Visit(MethodCallValue value) { }