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