xamarin-macios/tools/common
Rolf Bjarne Kvinge 5319266503
[static registrar] Compute the conversion methods for smart enums and embed those as token references in the generated code. (#3385)
Converting to and from smart enums and their corresponding native value
requires knowing the conversion function, since each smart enum has its own
conversion function.

The dynamic registrar can do this at runtime, but it's something that can be
computed in the static registrar at build time, so do that. The static
registrar will now embed the metadata token (as a token reference) in the
generated code, which can be used at runtime to find the conversion method,
without requiring anything from dynamic registrar.

This requires some refactoring in the conversion methods to allow passing more
information around (the `context` parameter in the conversion functions, which
the smart enum conversion methods now use for the token reference).

It turns out this is a massive improvement (although the scenarios where this
is relevant are rare): a simple test case [1] is 300x faster (from ~30s to
0.1s).

[1]: https://gist.github.com/rolfbjarne/961af28d1c2727b256fbcdfd6aa65e98
2018-02-05 07:54:13 +01:00
..
Application.cs [Mmp] Allow multiple assemblies to be passed to generate the registrar (#3129) 2018-01-25 19:57:44 -05:00
Assembly.cs [mmp/mtouch] Don't link with frameworks not available in the current SDK. Fixes #59636. (#2777) (#2784) 2017-09-27 15:53:41 +02:00
BuildTasks.cs [mtouch] Add support for creating a dot file of the build tree. 2017-02-10 14:46:30 +01:00
CompilerFlags.cs Merge latest d15-3 fixes into xcode9 (#2660) 2017-09-12 13:08:55 -04:00
CoreResolver.cs [Mmp] Allow multiple assemblies to be passed to generate the registrar (#3129) 2018-01-25 19:57:44 -05:00
DerivedLinkContext.cs [linker] Implement a generic method of storing attributes the linker removes. (#3280) 2018-01-24 15:58:47 +01:00
Driver.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
Frameworks.cs [MetalPerformanceShaders] Xcode 9 bindings (#3005) 2017-11-28 14:29:05 -06:00
MachO.cs Merge xcode9 into d15-4[-xi] (#2710) 2017-09-15 17:53:16 -04:00
Make.common Move MT0091 to common code so Xamarin.Mac can benefit from the more f… (#2780) 2017-09-29 12:45:53 -05:00
Optimizations.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
PInvokeWrapperGenerator.cs [static registrar] Put the generated @interface declaration for public types in the header. 2017-04-25 16:06:41 +02:00
SdkVersions.cs.in Move MT0091 to common code so Xamarin.Mac can benefit from the more f… (#2780) 2017-09-29 12:45:53 -05:00
StaticRegistrar.cs [static registrar] Compute the conversion methods for smart enums and embed those as token references in the generated code. (#3385) 2018-02-05 07:54:13 +01:00
StringUtils.cs [mtouch][mmp] Allow the use of major-only version numbers in arguments. Fixes #60280 (#3029) 2017-11-23 11:16:30 -05:00
Symbols.cs [mmp] Fix symbol name for 32-bit Objective-C classes. Fixes #58861. (#2506) 2017-08-24 09:42:08 +02:00
Target.cs [macos] Error when linking mix-mode assemblies (#2911) 2017-11-16 09:18:18 -06:00
TargetFramework.cs [generator] Don't define 'GENERATOR', since IKVM sources use the same name (for something else). (#1811) 2017-03-02 07:13:10 +01:00
cache.cs Merge Quote methods into a single class instead of multiple versions (#2153) 2017-06-06 12:32:25 -08:00