Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DefaultValueInstruction.cs
Go to the documentation of this file.
3
5
6internal sealed class DefaultValueInstruction : Instruction
7{
8 private readonly Type _type;
9
10 public override int ProducedStack => 1;
11
12 public override string InstructionName => "DefaultValue";
13
15 {
16 _type = type;
17 }
18
19 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2077:UnrecognizedReflectionPattern", Justification = "_type is a ValueType. You can always get an uninitialized ValueType.")]
20 public override int Run(InterpretedFrame frame)
21 {
23 return 1;
24 }
25
26 public override string ToString()
27 {
28 return "DefaultValue " + _type;
29 }
30}
static object GetUninitializedObject([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)