13 instantiations of ValueTypeValue
ILCompiler.Compiler (13)
Compiler\TypePreinit.cs (13)
431
fieldValue = new
ValueTypeValue
(GetFieldRvaData(ecmaField));
1903
return new
ValueTypeValue
(locationType);
2357
return new
ValueTypeValue
((byte[])InstanceBytes.Clone());
2431
public static ValueTypeValue FromSByte(sbyte value) => new
ValueTypeValue
(new byte[1] { (byte)value });
2432
public static ValueTypeValue FromInt16(short value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2433
public static ValueTypeValue FromInt32(int value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2434
public static ValueTypeValue FromInt64(long value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2435
public static ValueTypeValue FromSingle(float value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2436
public static ValueTypeValue FromDouble(double value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
3170
var result = new
ValueTypeValue
(type);
3407
ValueTypeValue result = new
ValueTypeValue
(((ArrayType)Type).ElementType);
3587
var result = new
ValueTypeValue
(type);
3659
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));
936
ValueTypeValue
.FromInt32((sbyte)(int)Math.Clamp(double.IsNaN(val) ? 0 : val, sbyte.MinValue, sbyte.MaxValue)));
943
ValueTypeValue
.FromInt32((short)(int)Math.Clamp(double.IsNaN(val) ? 0 : val, short.MinValue, short.MaxValue)));
946
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
949
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)val));
956
ValueTypeValue
.FromInt32((byte)(int)Math.Clamp(double.IsNaN(val) ? 0 : val, byte.MinValue, byte.MaxValue)));
963
ValueTypeValue
.FromInt32((ushort)(int)Math.Clamp(double.IsNaN(val) ? 0 : val, ushort.MinValue, ushort.MaxValue)));
966
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)(uint)val));
969
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)(ulong)val));
972
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
975
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(val));
1401
?
ValueTypeValue
.FromInt32(1)
1402
:
ValueTypeValue
.FromInt32(0));
1424
?
ValueTypeValue
.FromInt32(1)
1425
:
ValueTypeValue
.FromInt32(0));
1433
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt32(-value.Value.AsInt32()));
1435
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt64(-value.Value.AsInt64()));
1437
stack.Push(value.ValueKind,
ValueTypeValue
.FromDouble(-value.Value.AsDouble()));
1486
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int32,
ValueTypeValue
.FromInt32(result));
1512
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1532
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(result));
1538
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1579
stack.Push(StackValueKind.NativeInt, context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(arrayInstance.Length) :
ValueTypeValue
.FromInt32(arrayInstance.Length));
1957
retVal =
ValueTypeValue
.FromSByte(typeToCheckForValueType.TypeRepresented.IsValueType ? (sbyte)1 : (sbyte)0);
1963
retVal =
ValueTypeValue
.FromSByte(parameters[0] == parameters[1] ? (sbyte)1 : (sbyte)0);
1972
retVal =
ValueTypeValue
.FromSByte(result ? (sbyte)1 : (sbyte)0);
2083
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)value.AsSByte())); break;
2086
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)value.AsInt16())); break;
2088
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsSByte())); break;
2090
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsInt16())); break;
2103
Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(value.AsSingle())); break;
2152
return
ValueTypeValue
.FromSByte((sbyte)value);
2156
return
ValueTypeValue
.FromInt16((short)value);
2181
return
ValueTypeValue
.FromSByte((sbyte)value);
2185
return
ValueTypeValue
.FromInt16((short)value);
2188
return
ValueTypeValue
.FromInt32((int)value);
2205
return
ValueTypeValue
.FromSingle((float)popped.Value.AsDouble());
2374
if (!(value is
ValueTypeValue
vtvalue))
2385
if (!(value is
ValueTypeValue
vtvalue)
2394
if (InstanceBytes[i] != ((
ValueTypeValue
)value).InstanceBytes[i])
2431
public static
ValueTypeValue
FromSByte(sbyte value) => new ValueTypeValue(new byte[1] { (byte)value });
2432
public static
ValueTypeValue
FromInt16(short value) => new ValueTypeValue(BitConverter.GetBytes(value));
2433
public static
ValueTypeValue
FromInt32(int value) => new ValueTypeValue(BitConverter.GetBytes(value));
2434
public static
ValueTypeValue
FromInt64(long value) => new ValueTypeValue(BitConverter.GetBytes(value));
2435
public static
ValueTypeValue
FromSingle(float value) => new ValueTypeValue(BitConverter.GetBytes(value));
2436
public static
ValueTypeValue
FromDouble(double value) => new ValueTypeValue(BitConverter.GetBytes(value));
2567
&& value is
ValueTypeValue
guidValue
2804
return _parent._type.Context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(0) :
ValueTypeValue
.FromInt32(0);
3040
return
ValueTypeValue
.FromInt32(_value._length / elementType.InstanceFieldSize.AsInt);
3149
if (value is not
ValueTypeValue
srcVal)
3170
var
result = new ValueTypeValue(type);
3388
if (!(value is
ValueTypeValue
valueToStore))
3407
ValueTypeValue
result = new ValueTypeValue(((ArrayType)Type).ElementType);
3511
bool success = new FieldAccessor(bytes).TrySetField(lengthField,
ValueTypeValue
.FromInt32(value.Length));
3566
if (!(value is
ValueTypeValue
valuetype))
3587
var
result = new ValueTypeValue(type);
3650
public
ValueTypeValue
GetField(FieldDesc field)
3659
var
result = new ValueTypeValue(field.FieldType);
3692
if (value is not
ValueTypeValue
vtValue)