internal ElementBoxStorage(CompilerScope.Storage array, int index, ParameterExpression variable) : base(array.Compiler, variable) { this._array = array; this._index = index; this._boxType = typeof(StrongBox <>).MakeGenericType(new Type[] { variable.Type }); this._boxValueField = this._boxType.GetField("Value"); }
internal ElementBoxStorage(CompilerScope.Storage array, int index, ParameterExpression variable) : base(array.Compiler, variable) { this._array = array; this._index = index; this._boxType = typeof(StrongBox<>).MakeGenericType(new Type[] { variable.Type }); this._boxValueField = this._boxType.GetField("Value"); }
internal virtual void EmitStore(CompilerScope.Storage value) { value.EmitLoad(); this.EmitStore(); }
internal override void EmitStore(CompilerScope.Storage value) { base.Compiler.IL.Emit(OpCodes.Ldloc, this._boxLocal); value.EmitLoad(); base.Compiler.IL.Emit(OpCodes.Stfld, this._boxValueField); }