Cosmos/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpInt64.cs
2014-07-14 16:41:57 +00:00

60 lines
No EOL
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.ILOpCodes
{
public class OpInt64 : ILOpCode
{
public readonly UInt64 Value;
public OpInt64(Code aOpCode, int aPos, int aNextPos, UInt64 aValue, System.Reflection.ExceptionHandlingClause aCurrentExceptionHandler)
: base(aOpCode, aPos, aNextPos, aCurrentExceptionHandler)
{
Value = aValue;
}
public override int NumberOfStackPops
{
get
{
switch (OpCode)
{
case Code.Ldc_I8:
return 0;
default:
throw new NotImplementedException("OpCode '" + OpCode + "' not implemented!");
}
}
}
public override int NumberOfStackPushes
{
get
{
switch (OpCode)
{
case Code.Ldc_I8:
return 1;
default:
throw new NotImplementedException("OpCode '" + OpCode + "' not implemented!");
}
}
}
protected override void DoInitStackAnalysis()
{
base.DoInitStackAnalysis();
switch (OpCode)
{
case Code.Ldc_I8:
StackPushTypes[0] = typeof (long);
return;
default:
break;
}
}
}
}