public void PushValue() {
switch (this.storage.Location) {
case ItemLocation.Stack:
this.helper.Emit(OpCodes.Dup);
break;
case ItemLocation.Parameter:
this.helper.LoadParameter(this.storage.ParameterLocation);
break;
case ItemLocation.Local:
this.helper.Emit(OpCodes.Ldloc, this.storage.LocalLocation);
break;
case ItemLocation.Current:
this.helper.Emit(OpCodes.Ldloca, this.storage.CurrentLocation);
this.helper.Call(this.storage.CurrentLocation.LocalType.GetMethod("get_Current"));
break;
default:
Debug.Assert(false, "Invalid location: " + this.storage.Location);
break;
}
}