internal LocalBoxStorage(LambdaCompiler compiler, ParameterExpression variable) : base(compiler, variable) { Type boxType = typeof(StrongBox <>).MakeGenericType(variable.Type); _boxValueField = boxType.GetField("Value"); // Set name if DebugInfoGenerator support is brought back. _boxLocal = compiler.GetLocal(boxType); }
internal LocalStorage(LambdaCompiler compiler, ParameterExpression variable) : base(compiler, variable) { // ByRef variables are supported. This is used internally by // the compiler when emitting an inlined lambda invoke, to // handle ByRef parameters. BlockExpression prevents this // from being exposed to user created trees. // Set name if DebugInfoGenerator support is brought back. _local = compiler.GetLocal(variable.IsByRef ? variable.Type.MakeByRefType() : variable.Type); }