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

◆ EmitConstantFromArray()

void System.Linq.Expressions.Compiler.BoundConstants.EmitConstantFromArray ( LambdaCompiler lc,
object value,
Type type )
inlineprivate

Definition at line 125 of file BoundConstants.cs.

126 {
128 {
131 }
132 lc.IL.EmitPrimitive(value2);
133 lc.IL.Emit(OpCodes.Ldelem_Ref);
134 if (type.IsValueType)
135 {
136 lc.IL.Emit(OpCodes.Unbox_Any, type);
137 }
138 else if (type != typeof(object))
139 {
140 lc.IL.Emit(OpCodes.Castclass, type);
141 }
142 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
readonly Dictionary< object, int > _indexes
static readonly OpCode Castclass
Definition OpCodes.cs:235
static readonly OpCode Unbox_Any
Definition OpCodes.cs:329
static readonly OpCode Ldelem_Ref
Definition OpCodes.cs:307

References System.Linq.Expressions.Compiler.BoundConstants._indexes, System.Linq.Expressions.Compiler.BoundConstants._values, System.Collections.Generic.List< T >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Reflection.Emit.OpCodes.Castclass, System.Collections.Generic.List< T >.Count, System.Reflection.Emit.OpCodes.Ldelem_Ref, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.type, System.Reflection.Emit.OpCodes.Unbox_Any, and System.value.

Referenced by System.Linq.Expressions.Compiler.BoundConstants.EmitCacheConstants(), and System.Linq.Expressions.Compiler.BoundConstants.EmitConstant().