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

◆ AddressOfWriteBackCore() [1/2]

WriteBack System.Linq.Expressions.Compiler.LambdaCompiler.AddressOfWriteBackCore ( IndexExpression node)
inlineprivate

Definition at line 326 of file LambdaCompiler.cs.

327 {
329 Type type = null;
330 if (node.Object != null)
331 {
332 EmitInstance(node.Object, out type);
335 }
336 int argumentCount = node.ArgumentCount;
338 for (int i = 0; i < argumentCount; i++)
339 {
340 Expression argument = node.GetArgument(i);
345 args[i] = local;
346 }
351 return delegate(LambdaCompiler @this)
352 {
353 if (instanceLocal != null)
354 {
356 @this.FreeLocal(instanceLocal);
357 }
359 foreach (LocalBuilder local2 in array)
360 {
361 @this._ilg.Emit(OpCodes.Ldloc, local2);
362 @this.FreeLocal(local2);
363 }
365 @this.FreeLocal(valueLocal);
366 @this.EmitSetIndexCall(node, instanceLocal?.LocalType);
367 };
368 }
void EmitInstance(Expression instance, out Type type)
void EmitGetIndexCall(IndexExpression node, Type objectType)
void EmitSetIndexCall(IndexExpression node, Type objectType)
LambdaCompiler(AnalyzedTree tree, LambdaExpression lambda)
virtual void Emit(OpCode opcode)
static readonly OpCode Ldloca
Definition OpCodes.cs:427
static readonly OpCode Stloc
Definition OpCodes.cs:429
static readonly OpCode Ldloc
Definition OpCodes.cs:425
static readonly OpCode Dup
Definition OpCodes.cs:77

References System.Linq.Expressions.Compiler.LambdaCompiler._ilg, System.array, System.Reflection.Emit.OpCodes.Dup, System.Reflection.Emit.ILGenerator.Emit(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitGetIndexCall(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitInstance(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitSetIndexCall(), System.Linq.Expressions.Compiler.LambdaCompiler.FreeLocal(), System.Linq.Expressions.Compiler.LambdaCompiler.GetInstanceLocal(), System.Linq.Expressions.Compiler.LambdaCompiler.GetLocal(), System.Reflection.Emit.OpCodes.Ldloc, System.Reflection.Emit.OpCodes.Ldloca, System.Reflection.Emit.OpCodes.Stloc, and System.type.