Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GetArrayItemInstruction.cs
Go to the documentation of this file.
1
namespace
System.Linq.Expressions.Interpreter
;
2
3
internal
sealed
class
GetArrayItemInstruction
:
Instruction
4
{
5
internal
static
readonly
GetArrayItemInstruction
Instance
=
new
GetArrayItemInstruction
();
6
7
public
override
int
ConsumedStack
=> 2;
8
9
public
override
int
ProducedStack
=> 1;
10
11
public
override
string
InstructionName
=>
"GetArrayItem"
;
12
13
private
GetArrayItemInstruction
()
14
{
15
}
16
17
public
override
int
Run
(
InterpretedFrame
frame)
18
{
19
int
index
=
ConvertHelper
.
ToInt32NoNull
(frame.
Pop
());
20
Array
array
= (
Array
)frame.
Pop
();
21
frame.
Push
(
array
.GetValue(
index
));
22
return
1;
23
}
24
}
System.Array
Definition
Array.cs:16
System.Linq.Expressions.Interpreter.ConvertHelper.ToInt32NoNull
static int ToInt32NoNull(object val)
Definition
ConvertHelper.cs:5
System.Linq.Expressions.Interpreter.ConvertHelper
Definition
ConvertHelper.cs:4
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.Instance
static readonly GetArrayItemInstruction Instance
Definition
GetArrayItemInstruction.cs:5
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.ProducedStack
override int ProducedStack
Definition
GetArrayItemInstruction.cs:9
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.ConsumedStack
override int ConsumedStack
Definition
GetArrayItemInstruction.cs:7
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.Run
override int Run(InterpretedFrame frame)
Definition
GetArrayItemInstruction.cs:17
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.GetArrayItemInstruction
GetArrayItemInstruction()
Definition
GetArrayItemInstruction.cs:13
System.Linq.Expressions.Interpreter.GetArrayItemInstruction.InstructionName
override string InstructionName
Definition
GetArrayItemInstruction.cs:11
System.Linq.Expressions.Interpreter.GetArrayItemInstruction
Definition
GetArrayItemInstruction.cs:4
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
Definition
ActionCallInstruction.cs:3
System.Linq.ExceptionArgument.index
@ index
System.ExceptionArgument.array
@ array
source
System.Linq.Expressions
System.Linq.Expressions.Interpreter
GetArrayItemInstruction.cs
Generated by
1.10.0