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

◆ EmitClosureCreation()

void System.Linq.Expressions.Compiler.LambdaCompiler.EmitClosureCreation ( LambdaCompiler inner)
inlineprivate

Definition at line 2275 of file LambdaCompiler.cs.

2276 {
2277 bool needsClosure = inner._scope.NeedsClosure;
2278 bool flag = inner._boundConstants.Count > 0;
2279 if (!needsClosure && !flag)
2280 {
2281 _ilg.EmitNull();
2282 return;
2283 }
2284 if (flag)
2285 {
2286 _boundConstants.EmitConstant(this, inner._boundConstants.ToArray(), typeof(object[]));
2287 }
2288 else
2289 {
2290 _ilg.EmitNull();
2291 }
2292 if (needsClosure)
2293 {
2295 }
2296 else
2297 {
2298 _ilg.EmitNull();
2299 }
2300 _ilg.EmitNew(CachedReflectionInfo.Closure_ObjectArray_ObjectArray);
2301 }
void EmitConstant(LambdaCompiler lc, object value, Type type)
void EmitGet(ParameterExpression variable)
readonly ParameterExpression SelfVariable

References System.Linq.Expressions.Compiler.LambdaCompiler._boundConstants, System.Linq.Expressions.Compiler.LambdaCompiler._ilg, System.Linq.Expressions.Compiler.LambdaCompiler._scope, System.Linq.Expressions.CachedReflectionInfo.Closure_ObjectArray_ObjectArray, System.Linq.Expressions.Compiler.BoundConstants.EmitConstant(), System.Linq.Expressions.Compiler.CompilerScope.EmitGet(), System.Linq.inner, System.Linq.Expressions.Compiler.CompilerScope.NearestHoistedLocals, and System.Linq.Expressions.Compiler.HoistedLocals.SelfVariable.

Referenced by System.Linq.Expressions.Compiler.LambdaCompiler.EmitDelegateConstruction().