File tree Expand file tree Collapse file tree
FastExpressionCompiler.LightExpression Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,7 +199,9 @@ public sealed class ValueRef<T>
199199 public static Expression ConstantRef < T > ( T value , out ValueRef < T > valueRef )
200200 {
201201 valueRef = new ValueRef < T > ( value ) ;
202- return new InstanceFieldExpression ( new ValueConstantExpression < T > ( valueRef ) , ValueRef < T > . ValueField ) ;
202+
203+ // todo: @perf try the intrinsic?
204+ return new InstanceFieldExpression ( new ValueConstantExpression < ValueRef < T > > ( valueRef ) , ValueRef < T > . ValueField ) ;
203205 }
204206
205207 /// <summary>Avoids the boxing for all (two) bool values</summary>
@@ -3879,7 +3881,7 @@ public sealed class ValueConstantExpression<T> : ConstantExpression
38793881 // Note: the Value is specifically an object despite possibility of strongly typed T, because this way it will be a single boxing.
38803882 // Otherwise even using the typed `T _value`, it will be boxed multiple times through its `object Value` accessor.
38813883 public override object Value { get ; }
3882- internal ValueConstantExpression ( object value ) => Value = value ;
3884+ internal ValueConstantExpression ( T value ) => Value = value ;
38833885}
38843886
38853887public sealed class TypedValueConstantExpression : ConstantExpression
Original file line number Diff line number Diff line change @@ -4102,7 +4102,7 @@ private static bool TryEmitArithmeticAndOrAssign(
41024102 var paramIndex = -1;
41034103 var localVarIndex = closure.GetDefinedLocalVarOrDefault(p);
41044104 if (localVarIndex != -1)
4105- EmitLoadLocalVariable(il, localVarIndex); // todo: @wip #346
4105+ EmitLoadLocalVariable(il, localVarIndex);
41064106 else
41074107 {
41084108 paramIndex = paramExprCount - 1;
You can’t perform that action at this time.
0 commit comments