Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FieldByRefUpdater.cs
Go to the documentation of this file.
2
4
5internal sealed class FieldByRefUpdater : ByRefUpdater
6{
7 private readonly LocalDefinition? _object;
8
9 private readonly FieldInfo _field;
10
11 public FieldByRefUpdater(LocalDefinition? obj, FieldInfo field, int argumentIndex)
12 : base(argumentIndex)
13 {
14 _object = obj;
15 _field = field;
16 }
17
18 public override void Update(InterpretedFrame frame, object value)
19 {
20 object obj = ((!_object.HasValue) ? null : frame.Data[_object.GetValueOrDefault().Index]);
22 }
23
24 public override void UndefineTemps(InstructionList instructions, LocalVariables locals)
25 {
26 if (_object.HasValue)
27 {
28 locals.UndefineLocal(_object.GetValueOrDefault(), instructions.Count);
29 }
30 }
31}
FieldByRefUpdater(LocalDefinition? obj, FieldInfo field, int argumentIndex)
override void Update(InterpretedFrame frame, object value)
override void UndefineTemps(InstructionList instructions, LocalVariables locals)
void UndefineLocal(LocalDefinition definition, int end)
void SetValue(object? obj, object? value)
Definition FieldInfo.cs:108