Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Timothy Risi 25468bf617 Merge Quote methods into a single class instead of multiple versions (#2153) 2017-06-06 12:32:25 -08:00
Alex Soto 43e220df7f [generator] Keep [NotImplemented] info so it is usable in 3rd party bindings. Fixes bug 52664 (#2131)
* [generator] Keep [NotImplemented] info so it is usable in 3rd party bindings. Fixes bug 52664

https://bugzilla.xamarin.com/show_bug.cgi?id=52664

Currently we do not keep the [NotImplemented](0) information and the
generator gets a little confused because it will not find an Export
inside the getters/setters of properties and there is no way to tell
if this was intentional or not. We now keep the [NotImplemented]
and also add some null checks in the generator where needed.

Reenabled tests disabled in 9f036b218a

[0]: https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-c-libraries/#Objective-C_Mutable_Pattern_and_Properties

* [generator] Implement feedback

* Added quote method
* Teach linker about NotImplementedAttribute

* [generator] Improve Quote method

* [generator] Fix quote now for realsssss
2017-05-25 14:42:25 -05:00
Marek Safar dce730ddb7 Update src mcs to csc (easy targets only) 2017-04-24 18:54:59 +02:00
Marek Safar 4e94334487 Update debug symbols names 2017-04-14 09:11:01 +02:00
Marek Safar 996b582128 Update few mcs calls in src/ 2017-04-14 09:11:01 +02:00
Rolf Bjarne Kvinge c3596041ee [src] Declare a single .SECONDARY without prerequisites. (#2000)
Declare a single .SECONDARY target without prerequisites, which means all
implicit targets are treated as secondary (which means they won't be
automatically deleted by make).
2017-04-12 09:18:43 -04:00
Alex Soto 3f0ad8d686 [generator] Enable warnaserror for our bindings (#1929)
Enabled `warnaserror` in our SDK bindings
2017-03-29 11:02:03 -06:00
Rolf Bjarne Kvinge 411bf55cd1 [generator] Generate generator-ikvm.csproj automatically. (#1898) 2017-03-23 14:25:37 +01:00
Rolf Bjarne Kvinge fe9bcb0dbd [generator] Build an assembly containing the binding attributes for each platform. 2017-03-09 12:47:57 +01:00
Rolf Bjarne Kvinge 3b555164c3 [generator] Build an IKVM-based generator (bgen.exe). 2017-03-09 12:47:57 +01:00
Rolf Bjarne Kvinge 51bb3bdec1 [generator] Add a project file for the IKVM-based generator. 2017-03-09 12:47:57 +01:00
Rolf Bjarne Kvinge 0215993ba5 [generator] Add Makefile logic to build an IKVM-version of the generator. 2017-03-09 12:47:57 +01:00
Rolf Bjarne Kvinge 5353607f53 [generator] Don't define 'GENERATOR', since IKVM sources use the same name (for something else). (#1811)
Generator diff: https://gist.github.com/rolfbjarne/fa9d91f13a6421135e089bed8e1ccefe
2017-03-02 07:13:10 +01:00
Rolf Bjarne Kvinge 87de3d0e23 [generator] Don't specify platform-specific conditional compilation symbols. (#1735)
All the platform-specific conditional compilation symbols are unusued, so we
don't need to define them anymore.

Generator diff: https://gist.github.com/rolfbjarne/865b4ed20648614ceff04a870a3d0786
2017-02-21 15:54:26 -05:00
Rolf Bjarne Kvinge 88e0eb5fc8 [generator] Use target framework to determine the platform. (#1690)
This cuts down another group of conditional compilation sections, paving the
way for an IKVM-based generator.

This makes it required to pass --target-framework for to generator executables
(previously only required for Xamarin.Mac/Unified to distinguish between the
different Xamarin.Mac/Unified variants), but it should be invisible to users
since we'll automatically pass the correct --target-framework argument from
the corresponding scripts (btouch/btv/bwatch/bmac) and the MSBuild targets.
This will only break somebody who is executing the managed executables
directly, but nobody should do that in the first place (it's not a supported
scenario).

Generated diff: https://gist.github.com/rolfbjarne/1674be6625632446dba774a305951981
2017-02-17 14:53:58 -05:00
Rolf Bjarne Kvinge a1245c8db6 [generator] Generate the list of frameworks in each platform based on the information in the makefiles. (#1687)
Generate the list of frameworks in each platform based on the information in
the makefiles and use that information to remove the remaining framework-
specific ifdefs in the generator.

There are still platform-specific checks when determining the UINamespaces and
ImplicitNamespaces, to make sure the generated code doesn't change. Ideally
we'll remove the platform-specific logic at some point, but that's not the
goal with this commit.

Generator diff: https://gist.github.com/rolfbjarne/6803740e37a5976e139afb28e16b4ccf
The generated generator-frameworks.cs: https://gist.github.com/rolfbjarne/6d1a3452db4cecb8f163c4d91d622082
2017-02-13 18:01:16 +01:00
Rolf Bjarne Kvinge 38abe50b58 [generator] Add a class to take care of all the attributes. (#1661)
IKVM's API to get attributes does not match System.Reflection's API, so
abstract all we need out to a separate class to make it easier to port it to
IKVM later.
2017-02-08 19:01:24 -05:00
Rolf Bjarne Kvinge 13bbda632e [generator] Add type manager. (#1637)
* [generator] Add type manager.

`typeof` expressions can't be used with IKVM, so add a type manager that
handles all the type lookup. For now it just uses `typeof`s to find types, but
that'll change to be a string-based lookup instead (which would be IKVM-
compatible).

* [generator] Move the type manager to its own file.

* [generator] Load missing type.
2017-02-07 12:15:36 +01:00
Rolf Bjarne Kvinge 737f0d5739 [generator] Move the attributes to their own file. (#1408)
An IKVM-based generator will have the attributes in a separate assembly,
so they need to be in a different file.
2016-12-23 17:13:55 +01:00
Rolf Bjarne Kvinge ffe3184345 [generator] Use --target-framework to specify which XM profile to target. (#1339) 2016-12-20 11:33:56 +01:00
Rolf Bjarne Kvinge 80ed4473b0 [src] Include netstandard20 System.Drawing types in Xamarin.WatchOS.dll. (#1156) 2016-11-10 14:26:53 +01:00
Rolf Bjarne Kvinge 9d85ca79ab Unify stret detection between the generator and platform assemblies, and fix stret detection on watchOS. Fixes #44709.
Unify the code to determine whether a particular return type requires a stret
signature or not between the generator and platform assemblies.

Also fix the stret detection for armv7k, whose calling convention is not
identical to armv7(s): there's the concept of homogeneous structures, which
contains multiple elements of only one type, and which is sometimes passed in
registers on armv7k.

https://bugzilla.xamarin.com/show_bug.cgi?id=44709
2016-10-13 17:35:51 +02:00
Rolf Bjarne Kvinge 084e691be2 [src] Make sure to always set all variants of our conditional compilation symbols. (#986)
For Unified, set XAMCORE_2_0, UNIFIED and __UNIFIED__.

For Xamarin.iOS/tvOS/watchOS set both the normal and underscored versions
(IOS and __IOS__, TVOS and __TVOS__, and WATCHOS and __WATCHOS__).

The underscored versions are the public symbols we're setting in the
corresponding projects, so we should use those everywhere to simplify our
code, but due to historical reasons we're still using the other variants in
existing code.

Making sure all the possible variants are set for all projects, makes it
possible to only use the underscored versions in new code.

Also define `GENERATOR` for the generator, so that we can easily share
files between the generator and platform assemblies.
2016-10-13 15:10:24 +02:00
Rolf Bjarne Kvinge 5830166c63 Build the platform assemblies. 2016-04-24 14:47:26 -04:00