public void FreeTemporaryLocal (LocalBuilder b, TypeSpec t)
{
if (temporary_storage == null) {
temporary_storage = new Dictionary<TypeSpec, object> (ReferenceEquality<TypeSpec>.Default);
temporary_storage.Add (t, b);
return;
}
object o;
if (!temporary_storage.TryGetValue (t, out o)) {
temporary_storage.Add (t, b);
return;
}
var s = o as Stack<LocalBuilder>;
if (s == null) {
s = new Stack<LocalBuilder> ();
s.Push ((LocalBuilder)o);
temporary_storage [t] = s;
}
s.Push (b);
}