Browse Source

2003-07-17 Miguel de Icaza <[email protected]>

	* expression.cs (LocalVariableReference.Emit, EmitAssign,
	AddressOf): Do not use EmitThis, that was wrong, use the actual
	this pointer.

svn path=/trunk/mcs/; revision=16323
Miguel de Icaza 22 years ago
parent
commit
dbb924d2c3
3 changed files with 26 additions and 6 deletions
  1. 19 0
      mcs/mcs/ChangeLog
  2. 7 5
      mcs/mcs/expression.cs
  3. 0 1
      mcs/mcs/literal.cs

+ 19 - 0
mcs/mcs/ChangeLog

@@ -1,3 +1,22 @@
+2003-07-17  Miguel de Icaza  <[email protected]>
+
+	* expression.cs (LocalVariableReference.Emit, EmitAssign,
+	AddressOf): Do not use EmitThis, that was wrong, use the actual
+	this pointer.
+
+2003-07-15  Miguel de Icaza  <[email protected]>
+
+	* class.cs (MethodData.Define): While checking if a method is an
+	interface implementation, improve the test: If we are not public
+	(use new test here: use the computed MethodAttributes directly,
+	instead of the parsed modifier flags) check if the `implementing'
+	method comes from an interface or not.
+
+	* pending.cs (VerifyPendingMethods): Slightly better error
+	message.
+
+	* makefile: add test target that does the mcs bootstrap.
+
 2003-07-16  Ravi Pratap  <[email protected]>
 
 	* interface.cs (Define): Do nothing here since there are no

+ 7 - 5
mcs/mcs/expression.cs

@@ -3526,7 +3526,7 @@ namespace Mono.CSharp {
 			ILGenerator ig = ec.ig;
 
 			if (local_info.LocalBuilder == null){
-				ec.EmitThis ();
+				ig.Emit (OpCodes.Ldarg_0);
 				ig.Emit (OpCodes.Ldfld, local_info.FieldBuilder);
 			} else 
 				ig.Emit (OpCodes.Ldloc, local_info.LocalBuilder);
@@ -3541,7 +3541,7 @@ namespace Mono.CSharp {
 			local_info.Assigned = true;
 
 			if (local_info.LocalBuilder == null){
-				ec.EmitThis ();
+				ig.Emit (OpCodes.Ldarg_0);
 				source.Emit (ec);
 				ig.Emit (OpCodes.Stfld, local_info.FieldBuilder);
 			} else {
@@ -3552,11 +3552,13 @@ namespace Mono.CSharp {
 		
 		public void AddressOf (EmitContext ec, AddressOp mode)
 		{
+			ILGenerator ig = ec.ig;
+			
 			if (local_info.LocalBuilder == null){
-				ec.EmitThis ();
-				ec.ig.Emit (OpCodes.Ldflda, local_info.FieldBuilder);
+				ig.Emit (OpCodes.Ldarg_0);
+				ig.Emit (OpCodes.Ldflda, local_info.FieldBuilder);
 			} else
-				ec.ig.Emit (OpCodes.Ldloca, local_info.LocalBuilder);
+				ig.Emit (OpCodes.Ldloca, local_info.LocalBuilder);
 		}
 
 		public override string ToString ()

+ 0 - 1
mcs/mcs/literal.cs

@@ -34,7 +34,6 @@ namespace Mono.CSharp {
 			
 		public NullLiteral ()
 		{
-			Driver.counter1++;
 			eclass = ExprClass.Value;
 		}