Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OffsetInstruction.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
3
namespace
System.Linq.Expressions.Interpreter
;
4
5
internal
abstract
class
OffsetInstruction
:
Instruction
6
{
7
protected
int
_offset
=
int
.MinValue;
8
9
public
abstract
Instruction
[] Cache {
get
; }
10
11
public
Instruction
Fixup
(
int
offset
)
12
{
13
_offset
=
offset
;
14
Instruction
[]
cache
=
Cache
;
15
if
(
cache
!=
null
&&
offset
>= 0 &&
offset
<
cache
.Length)
16
{
17
return
cache
[
offset
] ?? (
cache
[
offset
] =
this
);
18
}
19
return
this
;
20
}
21
22
public
override
string
ToDebugString
(
int
instructionIndex
,
object
cookie
,
Func<int, int>
labelIndexer
,
IReadOnlyList<object>
objects
)
23
{
24
return
ToString
() + ((
_offset
!=
int
.MinValue) ? (
" -> "
+ (
instructionIndex
+
_offset
)) :
""
);
25
}
26
27
public
override
string
ToString
()
28
{
29
return
InstructionName
+ ((
_offset
==
int
.MinValue) ?
"(?)"
: (
"("
+
_offset
+
")"
));
30
}
31
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Linq.Expressions.Interpreter.Instruction.InstructionName
string InstructionName
Definition
Instruction.cs:19
System.Linq.Expressions.Interpreter.Instruction
Definition
Instruction.cs:6
System.Linq.Expressions.Interpreter.OffsetInstruction.Cache
Instruction[] Cache
Definition
OffsetInstruction.cs:9
System.Linq.Expressions.Interpreter.OffsetInstruction.Fixup
Instruction Fixup(int offset)
Definition
OffsetInstruction.cs:11
System.Linq.Expressions.Interpreter.OffsetInstruction._offset
int _offset
Definition
OffsetInstruction.cs:7
System.Linq.Expressions.Interpreter.OffsetInstruction.ToDebugString
override string ToDebugString(int instructionIndex, object cookie, Func< int, int > labelIndexer, IReadOnlyList< object > objects)
Definition
OffsetInstruction.cs:22
System.Linq.Expressions.Interpreter.OffsetInstruction.ToString
override string ToString()
Definition
OffsetInstruction.cs:27
System.Linq.Expressions.Interpreter.OffsetInstruction
Definition
OffsetInstruction.cs:6
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Linq.Expressions.Interpreter
Definition
ActionCallInstruction.cs:3
System.ExceptionArgument.offset
@ offset
source
System.Linq.Expressions
System.Linq.Expressions.Interpreter
OffsetInstruction.cs
Generated by
1.10.0