13 instantiations of ValueTypeValue
ILCompiler.Compiler (13)
Compiler\TypePreinit.cs (13)
431
fieldValue = new
ValueTypeValue
(GetFieldRvaData(ecmaField));
1887
return new
ValueTypeValue
(locationType);
2341
return new
ValueTypeValue
((byte[])InstanceBytes.Clone());
2415
public static ValueTypeValue FromSByte(sbyte value) => new
ValueTypeValue
(new byte[1] { (byte)value });
2416
public static ValueTypeValue FromInt16(short value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2417
public static ValueTypeValue FromInt32(int value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2418
public static ValueTypeValue FromInt64(long value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2419
public static ValueTypeValue FromSingle(float value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2420
public static ValueTypeValue FromDouble(double value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
3154
var result = new
ValueTypeValue
(type);
3391
ValueTypeValue result = new
ValueTypeValue
(((ArrayType)Type).ElementType);
3571
var result = new
ValueTypeValue
(type);
3643
var result = new
ValueTypeValue
(field.FieldType);
94 references to ValueTypeValue
ILCompiler.Compiler (94)
Compiler\TypePreinit.cs (94)
257
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value));
262
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)reader.ReadILUInt64()));
267
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(
274
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(type.GetElementSize().AsInt));
834
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32(val));
838
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((uint)val) :
ValueTypeValue
.FromInt32(val));
841
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
844
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
847
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
850
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
853
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
856
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
859
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
862
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((uint)val));
865
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
868
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
882
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32((int)val));
885
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
888
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
891
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
894
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
897
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
900
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
903
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
906
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
909
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
912
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
925
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)val) :
ValueTypeValue
.FromInt32((int)val));
929
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)(ulong)val) :
ValueTypeValue
.FromInt32((int)(uint)val));
932
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
935
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
938
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
941
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)val));
944
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
947
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
950
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)(uint)val));
953
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)(ulong)val));
956
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
959
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(val));
1385
?
ValueTypeValue
.FromInt32(1)
1386
:
ValueTypeValue
.FromInt32(0));
1408
?
ValueTypeValue
.FromInt32(1)
1409
:
ValueTypeValue
.FromInt32(0));
1417
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt32(-value.Value.AsInt32()));
1419
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt64(-value.Value.AsInt64()));
1421
stack.Push(value.ValueKind,
ValueTypeValue
.FromDouble(-value.Value.AsDouble()));
1470
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int32,
ValueTypeValue
.FromInt32(result));
1496
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1516
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(result));
1522
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1563
stack.Push(StackValueKind.NativeInt, context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(arrayInstance.Length) :
ValueTypeValue
.FromInt32(arrayInstance.Length));
1941
retVal =
ValueTypeValue
.FromSByte(typeToCheckForValueType.TypeRepresented.IsValueType ? (sbyte)1 : (sbyte)0);
1947
retVal =
ValueTypeValue
.FromSByte(parameters[0] == parameters[1] ? (sbyte)1 : (sbyte)0);
1956
retVal =
ValueTypeValue
.FromSByte(result ? (sbyte)1 : (sbyte)0);
2067
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)value.AsSByte())); break;
2070
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)value.AsInt16())); break;
2072
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsSByte())); break;
2074
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsInt16())); break;
2087
Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(value.AsSingle())); break;
2136
return
ValueTypeValue
.FromSByte((sbyte)value);
2140
return
ValueTypeValue
.FromInt16((short)value);
2165
return
ValueTypeValue
.FromSByte((sbyte)value);
2169
return
ValueTypeValue
.FromInt16((short)value);
2172
return
ValueTypeValue
.FromInt32((int)value);
2189
return
ValueTypeValue
.FromSingle((float)popped.Value.AsDouble());
2358
if (!(value is
ValueTypeValue
vtvalue))
2369
if (!(value is
ValueTypeValue
vtvalue)
2378
if (InstanceBytes[i] != ((
ValueTypeValue
)value).InstanceBytes[i])
2415
public static
ValueTypeValue
FromSByte(sbyte value) => new ValueTypeValue(new byte[1] { (byte)value });
2416
public static
ValueTypeValue
FromInt16(short value) => new ValueTypeValue(BitConverter.GetBytes(value));
2417
public static
ValueTypeValue
FromInt32(int value) => new ValueTypeValue(BitConverter.GetBytes(value));
2418
public static
ValueTypeValue
FromInt64(long value) => new ValueTypeValue(BitConverter.GetBytes(value));
2419
public static
ValueTypeValue
FromSingle(float value) => new ValueTypeValue(BitConverter.GetBytes(value));
2420
public static
ValueTypeValue
FromDouble(double value) => new ValueTypeValue(BitConverter.GetBytes(value));
2551
&& value is
ValueTypeValue
guidValue
2788
return _parent._type.Context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(0) :
ValueTypeValue
.FromInt32(0);
3024
return
ValueTypeValue
.FromInt32(_value._length / elementType.InstanceFieldSize.AsInt);
3133
if (value is not
ValueTypeValue
srcVal)
3154
var
result = new ValueTypeValue(type);
3372
if (!(value is
ValueTypeValue
valueToStore))
3391
ValueTypeValue
result = new ValueTypeValue(((ArrayType)Type).ElementType);
3495
bool success = new FieldAccessor(bytes).TrySetField(lengthField,
ValueTypeValue
.FromInt32(value.Length));
3550
if (!(value is
ValueTypeValue
valuetype))
3571
var
result = new ValueTypeValue(type);
3634
public
ValueTypeValue
GetField(FieldDesc field)
3643
var
result = new ValueTypeValue(field.FieldType);
3676
if (value is not
ValueTypeValue
vtValue)