xamarin-macios/tools/linker/MonoTouch.Tuner
Rolf Bjarne Kvinge b2bcad7a94
Add a BindingImpl attribute and use to to teach the linker look for it to search for optimizable code. (#3299)
* [ObjCRuntime] Add a BindingImplAttribute.

* [linker] Make ProviderToString an extension method on ICustomAttributeProvider to make it more discoverable.

* [generator] Use [BindingImpl] instead of [CompilerGenerated].

The entire diff is big (89MB), so it can't be gisted. However, most of it is
either removal of `using System.Runtime.CompilerServices;` or the change from
`[CompilerGenerated]` to `[BindingImpl (...)]` like this:
https://gist.github.com/rolfbjarne/8bfda3ed37b956d0342a1c1e9b079244

If I remove those parts of the diff, there's nothing significant left:
https://gist.github.com/rolfbjarne/4156164d6bdb1376366200394eb8a091

* [linker] Teach the linker about the new [BindingImpl] attribute.

In addition to the existing logic where the linker would optimize some
[CompilerGenerated] code (sometimes with additional requirements), it will now
also optimize all [BindingImpl (Optimizable)] code (without any additional
requirements).

* [tests] Add tests to make sure [BindingImpl (Optimizable)] works as expected.

* [linker] Check for [BindingImpl] before [CompilerGenerated] and stop checking for [CompilerGenerated] in XAMCORE_4_0.

Check for [BindingImpl] before checking for [CompilerGenerated], since the
former is more common.

Also stop checking for [CompilerGenerated] (at least to mean that code is
optimizable) in our next non-compatible evolutionary leap (XAMCORE_4_0):

* [introspection] Impl a better typo check.
2018-01-26 18:38:23 +01:00
..
Extensions.cs [linker] Improve inlining of IsDirectBinding check to inline both true and false values. (#3214) 2018-01-15 12:28:34 +01:00
InlinerSubStep.cs Revert "[linker] Inline BinaryCompatibility.TargetsAtLeast_Desktop_V4_5[_1] (#1518)" 2017-03-14 11:51:08 +01:00
ListExportedSymbols.cs [mtouch] Fix collecting required internal symbols which aren't in the objc_msgSend family. (#2330) 2017-07-18 14:26:45 +02:00
MetadataReducerSubStep.cs [linker] Update BaseSubStep subclasses to use ExceptionalSubStep (#1507) 2017-01-16 11:42:41 -05:00
MonoTouchMarkStep.cs [linker] Handle ParameterInfos preserved from XML definitions. Fixes #60176. (#2915) 2017-10-24 10:57:17 +02:00
MonoTouchProfile.cs Remove XI/Classic support (#926) 2016-09-30 15:02:17 -04:00
MonoTouchSweepStep.cs Wire up configuration to MonoTouchSweepStep 2017-03-14 11:51:08 +01:00
MonoTouchTypeMap.cs [linker] Implement a generic method of storing attributes the linker removes. (#3280) 2018-01-24 15:58:47 +01:00
OptimizeGeneratedCodeSubStep.cs [mtouch/mmp] Give users more control over optimizations, and share more code between mtouch and mmp. (#3242) 2018-01-23 11:33:48 +01:00
PreserveCode.cs Build mmp. 2016-04-24 14:47:26 -04:00
PreserveSmartEnumConversionsSubStep.cs Add a BindingImpl attribute and use to to teach the linker look for it to search for optimizable code. (#3299) 2018-01-26 18:38:23 +01:00
ProcessExportedFields.cs [mtouch/mmp] Share code between link contexts. 2017-01-18 10:48:11 +01:00
RemoveAttributes.cs [linker] Implement a generic method of storing attributes the linker removes. (#3280) 2018-01-24 15:58:47 +01:00
RemoveCode.cs [linker] Update BaseSubStep subclasses to use ExceptionalSubStep (#1507) 2017-01-16 11:42:41 -05:00
SealerSubStep.cs [linker] Update BaseSubStep subclasses to use ExceptionalSubStep (#1507) 2017-01-16 11:42:41 -05:00