Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Run()

override int System.Linq.Expressions.Interpreter.ByRefNewInstruction.Run ( InterpretedFrame frame)
inlinesealed

Definition at line 18 of file ByRefNewInstruction.cs.

19 {
20 int num = frame.StackIndex - _argumentCount;
21 object[] args = GetArgs(frame, num);
22 try
23 {
24 object obj;
25 try
26 {
27 obj = _constructor.Invoke(args);
28 }
30 {
31 ExceptionHelpers.UnwrapAndRethrow(exception);
33 }
34 frame.Data[num] = obj;
35 frame.StackIndex = num + 1;
36 }
37 finally
38 {
39 ByRefUpdater[] byrefArgs = _byrefArgs;
40 foreach (ByRefUpdater byRefUpdater in byrefArgs)
41 {
42 byRefUpdater.Update(frame, args[byRefUpdater.ArgumentIndex]);
43 }
44 }
45 return 1;
46 }
void Update(InterpretedFrame frame, object value)
object[] GetArgs(InterpretedFrame frame, int first)
object Invoke(object?[]? parameters)

References System.Linq.Expressions.Interpreter.NewInstruction._argumentCount, System.Linq.Expressions.Interpreter.ByRefNewInstruction._byrefArgs, System.Linq.Expressions.Interpreter.NewInstruction._constructor, System.Linq.Expressions.Interpreter.ByRefUpdater.ArgumentIndex, System.Linq.Expressions.Interpreter.InterpretedFrame.Data, System.exception, System.Linq.Expressions.Interpreter.NewInstruction.GetArgs(), System.Reflection.ConstructorInfo.Invoke(), System.obj, System.Dynamic.Utils.ContractUtils.Unreachable, System.Linq.Expressions.Interpreter.ExceptionHelpers.UnwrapAndRethrow(), and System.Linq.Expressions.Interpreter.ByRefUpdater.Update().