http://bugzilla.novell.com/show_bug.cgi?id=593628

http://bugzilla.novell.com/show_bug.cgi?id=593628#c1


Miguel de Icaza <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Miguel de Icaza <[email protected]> 2010-04-04 18:32:26 UTC 
---
A few thoughts, this is happening because we call this:

public static float Sum<TSource> (this IEnumerable<TSource> source,
Func<TSource, float> selector)

And our implementation is trying to share as much code as possible with other
implementations, but in the process we introduce a new Func`3 that the AOT
engine has no visibility on (a topic for a separate discussion, and something
worth researching) but we end up calling:

return Sum<TSource, float> (source, (a, b) => checked (a + selector (b)));

And this is where we fail, the code for this is:

public static float Sum<TSource> (this IEnumerable<TSource> source,
Func<TSource, float> selector)
{
Check.SourceAndSelector (source, selector);
return Sum<TSource, float> (source, (a, b) => checked (a + selector (b)));
}

Since this not only adds another layer of indirection, and a helper function
that needs to be JITed in any case, perhaps we should just inline all of these
cases

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to