Skip to content

Commit

Permalink
* MethodDef.cs: Params are 1 based if the method is static.
Browse files Browse the repository at this point in the history
svn path=/trunk/mcs/; revision=31423
  • Loading branch information
Jackson Harper committed Jul 23, 2004
1 parent fcef4eb commit c76c5a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mcs/ilasm/codegen/ChangeLog
@@ -1,3 +1,6 @@
2004-07-23 Jackson Harper <jackson@ximian.com>

* MethodDef.cs: Params are 1 based if the method is static.
2004-07-21 Jackson Harper <jackson@ximian.com>

* ExternTypeRefInst.cs: Use the PeapiType so that modified types
Expand Down
7 changes: 6 additions & 1 deletion mcs/ilasm/codegen/MethodDef.cs
Expand Up @@ -107,6 +107,10 @@ protected class GenericInfo {
get { return (call_conv & PEAPI.CallConv.Vararg) != 0; }
}

public bool IsStatic {
get { return (meth_attr & PEAPI.MethAttr.Static) != 0; }
}

public ITypeRef[] ParamTypeList () {

if (param_list == null)
Expand Down Expand Up @@ -621,7 +625,8 @@ private void CreateNamedParamTable ()
if (param_list == null)
return;

int count = 0;
int count = (IsStatic ? 0 : 1);

foreach (ParamDef param in param_list) {
if (param.Name != null)
named_param_table.Add (param.Name, count);
Expand Down

0 comments on commit c76c5a2

Please sign in to comment.