Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CreateDelegateInstruction.cs
Go to the documentation of this file.
1
using
System.Runtime.CompilerServices
;
2
3
namespace
System.Linq.Expressions.Interpreter
;
4
5
internal
sealed
class
CreateDelegateInstruction
:
Instruction
6
{
7
private
readonly
LightDelegateCreator
_creator
;
8
9
public
override
int
ConsumedStack
=>
_creator
.
Interpreter
.
ClosureSize
;
10
11
public
override
int
ProducedStack
=> 1;
12
13
public
override
string
InstructionName
=>
"CreateDelegate"
;
14
15
internal
CreateDelegateInstruction
(
LightDelegateCreator
delegateCreator)
16
{
17
_creator
= delegateCreator;
18
}
19
20
public
override
int
Run
(
InterpretedFrame
frame)
21
{
22
IStrongBox
[]
array
;
23
if
(
ConsumedStack
> 0)
24
{
25
array
=
new
IStrongBox
[
ConsumedStack
];
26
for
(
int
num =
array
.Length - 1; num >= 0; num--)
27
{
28
array
[num] = (
IStrongBox
)frame.
Pop
();
29
}
30
}
31
else
32
{
33
array
=
null
;
34
}
35
Delegate
value
=
_creator
.
CreateDelegate
(
array
);
36
frame.
Push
(
value
);
37
return
1;
38
}
39
}
System.Delegate
Definition
Delegate.cs:12
System.Linq.Expressions.Interpreter.CreateDelegateInstruction.Run
override int Run(InterpretedFrame frame)
Definition
CreateDelegateInstruction.cs:20
System.Linq.Expressions.Interpreter.CreateDelegateInstruction.ConsumedStack
override int ConsumedStack
Definition
CreateDelegateInstruction.cs:9
System.Linq.Expressions.Interpreter.CreateDelegateInstruction.CreateDelegateInstruction
CreateDelegateInstruction(LightDelegateCreator delegateCreator)
Definition
CreateDelegateInstruction.cs:15
System.Linq.Expressions.Interpreter.CreateDelegateInstruction._creator
readonly LightDelegateCreator _creator
Definition
CreateDelegateInstruction.cs:7
System.Linq.Expressions.Interpreter.CreateDelegateInstruction.InstructionName
override string InstructionName
Definition
CreateDelegateInstruction.cs:13
System.Linq.Expressions.Interpreter.CreateDelegateInstruction.ProducedStack
override int ProducedStack
Definition
CreateDelegateInstruction.cs:11
System.Linq.Expressions.Interpreter.CreateDelegateInstruction
Definition
CreateDelegateInstruction.cs:6
System.Linq.Expressions.Interpreter.Instruction
Definition
Instruction.cs:6
System.Linq.Expressions.Interpreter.InterpretedFrame.Pop
object Pop()
Definition
InterpretedFrame.cs:90
System.Linq.Expressions.Interpreter.InterpretedFrame.Push
void Push(object value)
Definition
InterpretedFrame.cs:55
System.Linq.Expressions.Interpreter.InterpretedFrame
Definition
InterpretedFrame.cs:7
System.Linq.Expressions.Interpreter.Interpreter.ClosureSize
int ClosureSize
Definition
Interpreter.cs:22
System.Linq.Expressions.Interpreter.LightDelegateCreator.CreateDelegate
Delegate CreateDelegate()
Definition
LightDelegateCreator.cs:17
System.Linq.Expressions.Interpreter.LightDelegateCreator.Interpreter
Interpreter Interpreter
Definition
LightDelegateCreator.cs:9
System.Linq.Expressions.Interpreter.LightDelegateCreator
Definition
LightDelegateCreator.cs:6
System.Runtime.CompilerServices.IStrongBox
Definition
IStrongBox.cs:4
System.Linq.Expressions.Interpreter
Definition
ActionCallInstruction.cs:3
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.ExceptionArgument.value
@ value
System.ExceptionArgument.array
@ array
source
System.Linq.Expressions
System.Linq.Expressions.Interpreter
CreateDelegateInstruction.cs
Generated by
1.10.0