зеркало из https://github.com/mono/ikvm-fork.git
Added support for boolean, byte, char and short non-final static field constant attributes.
This commit is contained in:
Родитель
179771d488
Коммит
afbe76e74d
|
@ -5108,7 +5108,23 @@ namespace IKVM.Internal
|
|||
{
|
||||
if (constant is int)
|
||||
{
|
||||
ilGenerator.Emit(OpCodes.Ldc_I4, (int)constant);
|
||||
ilGenerator.LazyEmitLdc_I4((int)constant);
|
||||
}
|
||||
else if (constant is bool)
|
||||
{
|
||||
ilGenerator.LazyEmitLdc_I4((bool)constant ? 1 : 0);
|
||||
}
|
||||
else if (constant is byte)
|
||||
{
|
||||
ilGenerator.LazyEmitLdc_I4((byte)constant);
|
||||
}
|
||||
else if (constant is char)
|
||||
{
|
||||
ilGenerator.LazyEmitLdc_I4((char)constant);
|
||||
}
|
||||
else if (constant is short)
|
||||
{
|
||||
ilGenerator.LazyEmitLdc_I4((short)constant);
|
||||
}
|
||||
else if (constant is long)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче