Optimise DynamicProxyMetaObject (#1152)
* Remove unnecessary ToArray call. * Remove Value property. One use compares with null, so cast to T is a waste. This leaves just one other use, so it can be inlined. * Remove _dontFallbackFirst Is always true. Remove it and branches for it being false. * Don't use Expression.Convert to reference types to object. The end-result is a no-op, so don't waste the allocation.
This commit is contained in:
committed by
James Newton-King
parent
cad2ec3a09
commit
ea6a21c4f3
@@ -2365,7 +2365,7 @@ namespace Newtonsoft.Json.Linq
|
||||
/// </returns>
|
||||
protected virtual DynamicMetaObject GetMetaObject(Expression parameter)
|
||||
{
|
||||
return new DynamicProxyMetaObject<JToken>(parameter, this, new DynamicProxy<JToken>(), true);
|
||||
return new DynamicProxyMetaObject<JToken>(parameter, this, new DynamicProxy<JToken>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user