+2002-01-22 Miguel de Icaza <miguel@ximian.com>
+
+ * ecore.cs (FieldExpr.Emit): Release temporaries.
+
+ * assign.cs (LocalTemporary.Release): new function.
+
+ * codegen.cs (EmitContext.GetTemporaryStorage,
+ EmitContext.FreeTemporaryStorage): Rework the way we deal with
+ temporary storage. Now we can "put back" localbuilders when we
+ are done with them
+
2002-01-21 Miguel de Icaza <miguel@ximian.com>
* ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
filter = accepting_filter;
if ((mt & MemberTypes.Field) != 0) {
- if (Fields != null) {
- foreach (Field f in Fields) {
+ if (fields != null) {
+ foreach (Field f in fields) {
FieldBuilder fb = f.FieldBuilder;
if (filter (fb, criteria) == true)
members.Add (fb);
}
}
- if (Constants != null) {
- foreach (Const con in Constants) {
+ if (constants != null) {
+ foreach (Const con in constants) {
FieldBuilder fb = con.FieldBuilder;
if (filter (fb, criteria) == true)
members.Add (fb);
}
if ((mt & MemberTypes.Method) != 0) {
- if (Methods != null) {
- foreach (Method m in Methods) {
+ if (methods != null) {
+ foreach (Method m in methods) {
MethodBuilder mb = m.MethodBuilder;
// If we are in transit, ignore
}
}
- if (Operators != null){
- foreach (Operator o in Operators) {
+ if (operators != null){
+ foreach (Operator o in operators) {
MethodBuilder ob = o.OperatorMethodBuilder;
if (filter (ob, criteria) == true)
}
if ((mt & MemberTypes.Event) != 0) {
- if (Events != null)
- foreach (Event e in Events) {
+ if (events != null)
+ foreach (Event e in events) {
if (filter (e.EventBuilder, criteria) == true)
members.Add (e.EventBuilder);
}
}
if ((mt & MemberTypes.Property) != 0){
- if (Properties != null)
- foreach (Property p in Properties) {
+ if (properties != null)
+ foreach (Property p in properties) {
if (filter (p.PropertyBuilder, criteria) == true) {
members.Add (p.PropertyBuilder);
}
}
- if (Indexers != null)
- foreach (Indexer ix in Indexers) {
+ if (indexers != null)
+ foreach (Indexer ix in indexers) {
if (filter (ix.PropertyBuilder, criteria) == true) {
members.Add (ix.PropertyBuilder);
}
//
static public bool AsAccessible (Type type, int flags)
{
- // FIXME: Implement me
return true;
}
if (!parent.MethodModifiersValid (ModFlags, Name, Location))
return false;
+ flags = Modifiers.MethodAttr (ModFlags);
//
// verify accessibility
//
//
// If we implement an interface, extract the interface name.
//
- flags = Modifiers.MethodAttr (ModFlags);
if (Name.IndexOf (".") != -1){
int pos = Name.LastIndexOf (".");
{
LocalBuilder location;
- if (temporary_storage == null)
- temporary_storage = new Hashtable ();
-
- location = (LocalBuilder) temporary_storage [t];
- if (location != null)
- return location;
+ if (temporary_storage != null){
+ location = (LocalBuilder) temporary_storage [t];
+ if (location != null)
+ return location;
+ }
location = ig.DeclareLocal (t);
- temporary_storage.Add (t, location);
return location;
}
+ public void FreeTemporaryStorage (LocalBuilder b)
+ {
+ // Empty for now.
+ }
+
/// <summary>
/// Current loop begin and end labels.
/// </summary>