public void setArgs(EXPR args)
{
RETAILVERIFY(this.isCALL() || this.isPROP() || this.isFIELD() || this.isARRAYINDEX());
if (this.isFIELD())
{
Debug.Assert(false, "Setting arguments on a field.");
return;
}
switch (kind)
{
case ExpressionKind.EK_CALL:
this.asCALL().SetOptionalArguments(args);
return;
case ExpressionKind.EK_PROP:
this.asPROP().SetOptionalArguments(args);
return;
case ExpressionKind.EK_ARRAYINDEX:
this.asARRAYINDEX().SetIndex(args);
return;
}
Debug.Assert(false, "Shouldn't get here without a CALL, PROP, FIELD or ARRINDEX");
}
protected void verifyMethodArgs(EXPR call, CType callingObjectType) { Debug.Assert(call.isCALL() || call.isPROP()); EXPR argsPtr = call.getArgs(); SymWithType swt = call.GetSymWithType(); MethodOrPropertySymbol mp = swt.Sym.AsMethodOrPropertySymbol(); TypeArray pTypeArgs = call.isCALL() ? call.asCALL().mwi.TypeArgs : null; EXPR newArgs; AdjustCallArgumentsForParams(callingObjectType, swt.GetType(), mp, pTypeArgs, argsPtr, out newArgs); call.setArgs(newArgs); }