13 instantiations of ValueTypeValue
ILCompiler.Compiler (13)
Compiler\TypePreinit.cs (13)
420
fieldValue = new
ValueTypeValue
(GetFieldRvaData(ecmaField));
1876
return new
ValueTypeValue
(locationType);
2330
return new
ValueTypeValue
((byte[])InstanceBytes.Clone());
2404
public static ValueTypeValue FromSByte(sbyte value) => new
ValueTypeValue
(new byte[1] { (byte)value });
2405
public static ValueTypeValue FromInt16(short value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2406
public static ValueTypeValue FromInt32(int value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2407
public static ValueTypeValue FromInt64(long value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2408
public static ValueTypeValue FromSingle(float value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
2409
public static ValueTypeValue FromDouble(double value) => new
ValueTypeValue
(BitConverter.GetBytes(value));
3143
var result = new
ValueTypeValue
(type);
3370
ValueTypeValue result = new
ValueTypeValue
(((ArrayType)Type).ElementType);
3547
var result = new
ValueTypeValue
(type);
3600
var result = new
ValueTypeValue
(field.FieldType);
94 references to ValueTypeValue
ILCompiler.Compiler (94)
Compiler\TypePreinit.cs (94)
246
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value));
251
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)reader.ReadILUInt64()));
256
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(
263
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(type.GetElementSize().AsInt));
823
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32(val));
827
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((uint)val) :
ValueTypeValue
.FromInt32(val));
830
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
833
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
836
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
839
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
842
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
845
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
848
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(val));
851
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((uint)val));
854
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
857
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
871
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(val) :
ValueTypeValue
.FromInt32((int)val));
874
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
877
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
880
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
883
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
886
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
889
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
892
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
895
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64(val));
898
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
901
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((double)val));
914
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)val) :
ValueTypeValue
.FromInt32((int)val));
918
context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64((long)(ulong)val) :
ValueTypeValue
.FromInt32((int)(uint)val));
921
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((sbyte)val));
924
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((short)val));
927
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)val));
930
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)val));
933
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)val));
936
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)val));
939
stack.Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((int)(uint)val));
942
stack.Push(StackValueKind.Int64,
ValueTypeValue
.FromInt64((long)(ulong)val));
945
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble((float)val));
948
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(val));
1374
?
ValueTypeValue
.FromInt32(1)
1375
:
ValueTypeValue
.FromInt32(0));
1397
?
ValueTypeValue
.FromInt32(1)
1398
:
ValueTypeValue
.FromInt32(0));
1406
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt32(-value.Value.AsInt32()));
1408
stack.Push(value.ValueKind,
ValueTypeValue
.FromInt64(-value.Value.AsInt64()));
1410
stack.Push(value.ValueKind,
ValueTypeValue
.FromDouble(-value.Value.AsDouble()));
1459
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int32,
ValueTypeValue
.FromInt32(result));
1485
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1505
stack.Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(result));
1511
stack.Push(isNint ? StackValueKind.NativeInt : StackValueKind.Int64,
ValueTypeValue
.FromInt64(result));
1552
stack.Push(StackValueKind.NativeInt, context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(arrayInstance.Length) :
ValueTypeValue
.FromInt32(arrayInstance.Length));
1930
retVal =
ValueTypeValue
.FromSByte(typeToCheckForValueType.TypeRepresented.IsValueType ? (sbyte)1 : (sbyte)0);
1936
retVal =
ValueTypeValue
.FromSByte(parameters[0] == parameters[1] ? (sbyte)1 : (sbyte)0);
1945
retVal =
ValueTypeValue
.FromSByte(result ? (sbyte)1 : (sbyte)0);
2056
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((byte)value.AsSByte())); break;
2059
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32((ushort)value.AsInt16())); break;
2061
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsSByte())); break;
2063
Push(StackValueKind.Int32,
ValueTypeValue
.FromInt32(value.AsInt16())); break;
2076
Push(StackValueKind.Float,
ValueTypeValue
.FromDouble(value.AsSingle())); break;
2125
return
ValueTypeValue
.FromSByte((sbyte)value);
2129
return
ValueTypeValue
.FromInt16((short)value);
2154
return
ValueTypeValue
.FromSByte((sbyte)value);
2158
return
ValueTypeValue
.FromInt16((short)value);
2161
return
ValueTypeValue
.FromInt32((int)value);
2178
return
ValueTypeValue
.FromSingle((float)popped.Value.AsDouble());
2347
if (!(value is
ValueTypeValue
vtvalue))
2358
if (!(value is
ValueTypeValue
vtvalue)
2367
if (InstanceBytes[i] != ((
ValueTypeValue
)value).InstanceBytes[i])
2404
public static
ValueTypeValue
FromSByte(sbyte value) => new ValueTypeValue(new byte[1] { (byte)value });
2405
public static
ValueTypeValue
FromInt16(short value) => new ValueTypeValue(BitConverter.GetBytes(value));
2406
public static
ValueTypeValue
FromInt32(int value) => new ValueTypeValue(BitConverter.GetBytes(value));
2407
public static
ValueTypeValue
FromInt64(long value) => new ValueTypeValue(BitConverter.GetBytes(value));
2408
public static
ValueTypeValue
FromSingle(float value) => new ValueTypeValue(BitConverter.GetBytes(value));
2409
public static
ValueTypeValue
FromDouble(double value) => new ValueTypeValue(BitConverter.GetBytes(value));
2540
&& value is
ValueTypeValue
guidValue
2777
return _parent._type.Context.Target.PointerSize == 8 ?
ValueTypeValue
.FromInt64(0) :
ValueTypeValue
.FromInt32(0);
3013
return
ValueTypeValue
.FromInt32(_value._length / elementType.InstanceFieldSize.AsInt);
3122
if (value is not
ValueTypeValue
srcVal)
3143
var
result = new ValueTypeValue(type);
3351
if (!(value is
ValueTypeValue
valueToStore))
3370
ValueTypeValue
result = new ValueTypeValue(((ArrayType)Type).ElementType);
3471
bool success = new FieldAccessor(bytes).TrySetField(lengthField,
ValueTypeValue
.FromInt32(value.Length));
3526
if (!(value is
ValueTypeValue
valuetype))
3547
var
result = new ValueTypeValue(type);
3591
public
ValueTypeValue
GetField(FieldDesc field)
3600
var
result = new ValueTypeValue(field.FieldType);
3633
if (value is not
ValueTypeValue
vtValue)