Large iterator refactoring, needed for some changes in the anonymous methods
authorMiguel de Icaza <miguel@gnome.org>
Wed, 14 Apr 2004 23:32:01 +0000 (23:32 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 14 Apr 2004 23:32:01 +0000 (23:32 -0000)
commit1843180aa80036e99b162cd52db2742d755324d5
treecb61fce7638a96a6a9076af94277cf497cb626a5
parent68b75621f5a21012f3d5508bf478124be29a92bd
Large iterator refactoring, needed for some changes in the anonymous methods
support.   What started as an innocent 10-line patch turned into a big
witch hunt.

2004-04-14  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (This.Emit): Use EmitContext.EmitThis to emit our
instance variable.

(This.EmitAssign): Ditto.

* ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
codepaths, we will move all the functionality into
Mono.CSharp.This

(FieldExpr.EmitAssign): Ditto.

This fixes several hidden bugs that I uncovered while doing a code
review of this today.

* codegen.cs (EmitThis): reworked so the semantics are more clear
and also support value types "this" instances.

* iterators.cs: Changed so that for iterators in value types, we
do not pass the value type as a parameter.

Initialization of the enumerator helpers is now done in the caller
instead of passing the parameters to the constructors and having
the constructor set the fields.

The fields have now `assembly' visibility instead of private.

svn path=/trunk/mcs/; revision=25513
mcs/mcs/ChangeLog
mcs/mcs/codegen.cs
mcs/mcs/ecore.cs
mcs/mcs/expression.cs
mcs/mcs/iterators.cs