13 instantiations of ValueTypeValue
ILCompiler.Compiler (13)
Compiler\TypePreinit.cs (13)
438
fieldValue = new
ValueTypeValue
(GetFieldRvaData(ecmaField));
1884
return new
ValueTypeValue
(locationType);
2339
return new
ValueTypeValue
((byte[])InstanceBytes.Clone());
2413
public static ValueTypeValue FromSByte(sbyte value) => new
ValueTypeValue
(new byte[1] { (byte)value });
2414
public static ValueTypeValue FromInt16(short value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2415
public static ValueTypeValue FromInt32(int value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2416
public static ValueTypeValue FromInt64(long value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2417
public static ValueTypeValue FromSingle(float value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2418
public static ValueTypeValue FromDouble(double value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
3163
var result = new
ValueTypeValue
(type);
3400
ValueTypeValue result = new
ValueTypeValue
(((ArrayType)Type).ElementType);
3580
var result = new
ValueTypeValue
(type);
3652
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));
841
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32(val));
845
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((uint)val) :
ValueTypeValue
.FromInt32(val));
848
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
851
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
854
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
857
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
860
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
863
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
866
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
869
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((uint)val));
872
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
875
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
889
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32((int)val));
892
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
895
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
898
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
901
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
904
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
907
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
910
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
913
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
916
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
919
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
932
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)val) :
ValueTypeValue
.FromInt32((int)val));
936
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)(ulong)val) :
ValueTypeValue
.FromInt32((int)(uint)val));
939
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
942
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
945
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
948
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)val));
951
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
954
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
957
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)(uint)val));
960
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)(ulong)val));
963
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
966
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(val));
1392
?
ValueTypeValue
.FromInt32(1)
1393
:
ValueTypeValue
.FromInt32(0));
1415
?
ValueTypeValue
.FromInt32(1)
1416
:
ValueTypeValue
.FromInt32(0));
1424
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt32(-value.Value.AsInt32()));
1426
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt64(-value.Value.AsInt64()));
1428
stack.Push(value.ValueKind,
ValueTypeValue
.FromDouble(-value.Value.AsDouble()));
1477
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int32,
ValueTypeValue
.FromInt32(result));
1503
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1523
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(result));
1529
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1570
stack.Push(StackValueKind.NativeInt, context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(arrayInstance.Length) :
ValueTypeValue
.FromInt32(arrayInstance.Length));
1938
retVal =
ValueTypeValue
.FromSByte(typeToCheckForValueType.TypeRepresented.IsValueType ? (sbyte)1 : (sbyte)0);
1944
retVal =
ValueTypeValue
.FromSByte(parameters[0] == parameters[1] ? (sbyte)1 : (sbyte)0);
1954
retVal =
ValueTypeValue
.FromSByte(result ? (sbyte)1 : (sbyte)0);
2065
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)value.AsSByte())); break;
2068
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)value.AsInt16())); break;
2070
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsSByte())); break;
2072
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsInt16())); break;
2085
Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(value.AsSingle())); break;
2134
return
ValueTypeValue
.FromSByte((sbyte)value);
2138
return
ValueTypeValue
.FromInt16((short)value);
2163
return
ValueTypeValue
.FromSByte((sbyte)value);
2167
return
ValueTypeValue
.FromInt16((short)value);
2170
return
ValueTypeValue
.FromInt32((int)value);
2187
return
ValueTypeValue
.FromSingle((float)popped.Value.AsDouble());
2356
if (!(value is
ValueTypeValue
vtvalue))
2367
if (!(value is
ValueTypeValue
vtvalue)
2376
if (InstanceBytes[i] != ((
ValueTypeValue
)value).InstanceBytes[i])
2413
public static
ValueTypeValue
FromSByte(sbyte value) => new ValueTypeValue(new byte[1] { (byte)value });
2414
public static
ValueTypeValue
FromInt16(short value) => new ValueTypeValue(BitConverter.GetBytes(value));
2415
public static
ValueTypeValue
FromInt32(int value) => new ValueTypeValue(BitConverter.GetBytes(value));
2416
public static
ValueTypeValue
FromInt64(long value) => new ValueTypeValue(BitConverter.GetBytes(value));
2417
public static
ValueTypeValue
FromSingle(float value) => new ValueTypeValue(BitConverter.GetBytes(value));
2418
public static
ValueTypeValue
FromDouble(double value) => new ValueTypeValue(BitConverter.GetBytes(value));
2549
&& value is
ValueTypeValue
guidValue
2786
return _parent._type.Context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(0) :
ValueTypeValue
.FromInt32(0);
3033
return
ValueTypeValue
.FromInt32(_value._length / elementType.InstanceFieldSize.AsInt);
3142
if (value is not
ValueTypeValue
srcVal)
3163
var
result = new ValueTypeValue(type);
3381
if (!(value is
ValueTypeValue
valueToStore))
3400
ValueTypeValue
result = new ValueTypeValue(((ArrayType)Type).ElementType);
3504
bool success = new FieldAccessor(bytes).TrySetField(lengthField,
ValueTypeValue
.FromInt32(value.Length));
3559
if (!(value is
ValueTypeValue
valuetype))
3580
var
result = new ValueTypeValue(type);
3643
public
ValueTypeValue
GetField(FieldDesc field)
3652
var
result = new ValueTypeValue(field.FieldType);
3685
if (value is not
ValueTypeValue
vtValue)