Compare commits

..
Author SHA1 Message Date
Alexander Köplinger 5077205a44 [pdb2mdb] Dispose Cecil AssemblyDefinition on pdb2mdb (#4899)
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=56275

Recent Cecil 0.10 changed to not reading the assembly in memory but
instead reads directly from the underlying stream [0]. This however
means that the file handle is not freed until the AssemblyDefinition
is disposed.

Xamarin.Android is using the pdb2mdb source as part of
Xamarin.Android.Build.Tasks.dll and hit an issue where the file
would be locked inside of VS.

[0] http://cecil.pe/post/149243207656/mono-cecil-010-beta-1
2017-05-18 15:41:08 -04:00
Jo Shields 0d6f6f8f40 Bump version, following 5.0.0.x release 2017-05-18 17:02:34 +01:00
Zoltan Varga d6c24517f4 [runtime] Make RuntimeHelpers:SufficientExecutionStack () a no-op on android for now. Fixes #56240. (#4889) 2017-05-17 12:34:11 -04:00
Rodrigo Kumpera 0f5c24054c Merge pull request #4885 from kumpera/backport_56177
[runtime] Fix pedump. Fixes bug #56177.
2017-05-16 23:48:14 -04:00
Zoltan Varga 3511ffcb2d [runtime] Fix pedump. 2017-05-16 16:20:15 -07:00
Alexander Köplinger 188c235ca4 [xbuild] Add web targets for 15.0 (#4868) (#4876)
(cherry picked from commit 8077ff5da7)
2017-05-16 19:46:57 +02:00
Aleksey Kliger 25ac18a9b7 [sre] Don't leak coop handles in mono_dynimage_encode_typedef_or_ref_full
This function calls mono_class_get_ref_info which allocates a coop handle.
However it is called from an icall that wasn't converted to use coop handles
yet, so nothing was saving/restoring the handle stack mark, and consequently
the handles leak.
2017-05-15 15:03:07 -04:00
Jonathan Chambers d95d7d30fe Use handle macros to avoid leaking result of mono_type_get_object_handle 2017-05-15 15:03:07 -04:00
Marek Safar 82d42e61b1 [runtime] Remove System.ValueTuple from denied assemblies. It's not needed
anymore because we have reference assemblies and it didn't work for mobile tools (e.g. linker)
2017-05-13 16:22:31 +02:00
Marek Safar 4c98dc2006 Revert "[runtime] Remove System.ValueTuple from denied assemblies. It's not needed"
This reverts commit 4dc09dc922.
2017-05-13 10:35:52 +02:00
Marek Safar 4dc09dc922 [runtime] Remove System.ValueTuple from denied assemblies. It's not needed
anymore because we have reference assemblies and it didn't work for mobile tools (e.g. linker)
2017-05-13 10:32:23 +02:00
Martin Baulig d27287c77b [System]: Cherry-pick GZipStream.BeginRead() fix from corefx. Bug #56260. (#4844)
https://github.com/dotnet/corefx/commit/a6c7e23421701870c1eb855eae95e4605e5b04b3.
2017-05-12 15:39:55 -04:00
Zoltan Varga 1298269b88 [arm] Disable the usage of lmf_ir_mono_lmf. Fixes #55087. (#4819) 2017-05-10 10:58:13 -04:00
Martin Baulig 2ce82742e8 Revert "[System]: Fix bug #52508 in HttpListener when doing multiple Https request."
This reverts commit 81da99eb76.
2017-05-08 15:05:33 -04:00
Martin Baulig 81da99eb76 [System]: Fix bug #52508 in HttpListener when doing multiple Https request.
Move the call to SslStream.AuthenticateAsServer() into the constructor because
we don't want to call it again when Init() is called from Close().

(cherry picked from commit 5e08742b5c)
(cherry picked from commit abfb9a00a7)
2017-05-08 15:01:45 -04:00
Martin Baulig 9667aa6485 [System]: Fix default TLS provider. (#4797) 2017-05-05 13:40:11 +02:00
Ankit Jain 1e856f02ff Empty commit to trigger a build on wrench 2017-05-03 19:58:19 -04:00
Vlad Brezae 6ab979c9df [sgen] Fix accidental triggering of degraded mode
We trigger degraded mode when we are unable to properly build the nursery fragments due to excessive nursery pinning. This is done by initializing degraded_mode at the end of a minor. alloc_degraded is used to do allocation to major heap either as part of mature allocation or as part of degraded mode (when we bump the degraded_mode so we can detect when the next minor should be triggered).

When failing to allocate from the nursery after doing a minor (because the other threads might have already consumed the nursery) we need to do a mature allocation (as a fallback) instead of a degraded mode allocation so we don't uselessly enable the mode.
2017-05-03 22:48:54 +03:00
Ankit Jain 02b6c24e5d Empty commit to trigger a build on wrench 2017-05-03 01:59:45 -04:00
Ankit Jain 87ad2c3690 Empty commit to trigger a build on wrench 2017-05-03 00:27:57 -04:00
Ankit Jain 3cde98344e Empty commit to trigger a build on wrench 2017-05-02 21:05:53 -04:00
Aleksey Kliger (λgeek) 1d0445bfc7 Merge pull request #4769 from lambdageek/bug-55681-2017-02
[sre-save] Handle ConstructorBuilder custom attribute constructors
2017-04-28 17:45:37 -04:00
Ankit Jain 1d389ea02c Empty commit to trigger a build on wrench 2017-04-28 11:56:06 -04:00
Aleksey Kliger ad60bf18b7 [sre-save] Handle ConstructorBuilder custom attribute constructors.
The code expected that a custom attribute was specified as a MonoCMethod and
was calling mono_image_create_token().  However that function expects to be
called from the managed S.R.E.ModuleBuilder:GetToken (MemberInfo) which handles
all the builders in managed code.  Consequently mono_image_create_token () was
asserting.

So now we encode the token for a ConstructorBuilder in place.
2017-04-28 11:46:47 -04:00
Aleksey Kliger c20c0b3b81 [sre] Make mono_image_get_methodref_token non-static in sre-internals.h 2017-04-28 11:46:46 -04:00
Aleksey Kliger d33f7f6de9 [test] Regression tests for ConstructorBuilder custom attributes
Regression tests for https://bugzilla.xamarin.com/show_bug.cgi?id=55681
2017-04-28 11:46:45 -04:00
nosami c8c005f137 Bump msbuild for F#. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55626 2017-04-28 09:28:36 +01:00
Ankit Jain 1aa58e9a46 Empty commit to trigger a build on wrench 2017-04-27 15:01:51 -04:00
Rodrigo Kumpera 5673411799 Merge pull request #4742 from kumpera/2017-02-backport-4682
2017 02 backport 4682
2017-04-26 00:00:11 -04:00
Zoltan Varga 1434f9c879 [jit] Remove some debug spew. 2017-04-25 05:11:19 -04:00
Rodrigo Kumpera 3598a4ab55 [bcl] Check the compact switch for whether cancelation token throws when disposed. 2017-04-24 14:14:20 -07:00
Rodrigo Kumpera 72cdd51acb [corlib] Change SwitchThrowExceptionIfDisposedCancellationTokenSource to false as this is the default 4.6.0 behavior. 2017-04-24 13:26:46 -07:00
Rodrigo Kumpera ea3996571a [bcl] Make our AppContextDefaultValues more compatible with RS and make them non toggle-able on mobile.
We change AppContextSwitches to hardcode values on mobile and use the full stack on desktop.

We still have all strings in AppContextDefaultValues as this reduces the ifdef mess in AppContextSwitches.
It's only used on desktop, where an extra kb is not the end of the world.
2017-04-24 13:26:19 -07:00
Vlad Brezae bdf17346a6 [metadata] Lock around special static fields hash access
If a type is loaded in another thread, the fields hash can get resized, leading to failure.
2017-04-24 23:25:25 +03:00
Rodrigo Kumpera 37f8c76e38 [corlib] Use AppContextSwitches implementation from RS. Fixes #54448
This change makes AppContextSwitches usable which allow backwards incompatible settings to be actually toggled.
2017-04-24 12:41:59 -07:00
Zoltan Varga cda97d6fc1 [cil-stripper] Mark stripped methods as noinline to prevent the JIT from trying to inline them. Fixes #55041. (#4732) 2017-04-24 13:42:55 -04:00
Alexander Köplinger 198ff835e9 [Facades] Use Open.snk for netstandard.dll
We were using the wrong key since dotnet/standard switched to using the new Open key.

(cherry picked from commit 27fd8e5ad8)
2017-04-24 16:28:10 +02:00
Ankit Jain ba317ed4e6 Empty commit to trigger Wrench build 2017-04-22 18:24:41 -04:00
Alexis Christoforides 450d4d7a9e Trigger package CI build 2017-04-21 18:09:33 -04:00
nosami 5da5fa26fb Bump bockbuild for F# jit tracking patch 2017-04-21 18:14:44 +01:00
Alexis Christoforides bee954cff2 Trigger package CI build 2017-04-21 11:10:27 -04:00
Alexander Köplinger 762430b83e [Facades] Allow passing $(EXTRA_LIB_MCS_FLAGS) to netstandard build 2017-04-21 17:01:34 +02:00
Zoltan Varga d717e1b1ea [runtime] Shadow copy the .pdb files as well. Fixes #55095. (#4715) 2017-04-20 09:49:16 -04:00
Ankit Jain 5a3893de5c Empty commit to trigger Wrench build 2017-04-20 08:52:51 -04:00
Alexis Christoforides 6dc5ddd3d9 Trigger package CI build 2017-04-19 12:28:50 -04:00
Marek Safar 6f6232707c Bump cecil 2017-04-19 12:01:31 +02:00
Mikayla Hutchinson 64a055b079 [Sockets] Fix RemoteEndpoint with async+DualMode (#4702) 2017-04-19 11:49:24 +02:00
Ankit Jain 34a69b5e81 Update NuGet.BuildTasks to dev15.1 from usptream (#4706)
* Update nuget-buildtasks from upstream's `dev15.1` branch

dev15.1 branch + fixup import paths

This was prompted by needing to support nuget restore for projects with
`PackageReference`.

* [nuget] Bump reference to NuGet.BuildTasks to pick up a build fix

* Bump nuget-buildtasks
2017-04-18 21:27:50 +02:00
Zoltan Varga b8c96604c5 [jit] Disable handler block trampolines+aot support on ios, it does an async stack walk, and the eh info for llvm compiled methods cannot be loaded in async context currently. Works around #54658. (#4713) 2017-04-18 14:04:30 -04:00
Alexander Kyte 440fff5aee Merge pull request #4681 from alexanderkyte/circular_type_memo
[runtime] Handle circular references in SRE types
2017-04-18 11:24:09 -04:00
Alexander Köplinger 502a6a5e1b Empty commit to trigger Wrench build 2017-04-18 14:26:24 +02:00
Mikayla Hutchinson 02f0d6ee9d Add System.Net.Http 4.3.1 to blacklist 2017-04-18 10:53:49 +02:00
Zoltan Varga 4242008df5 [arm] Fix a gsharedvt assertion which happens with gsharedvt methods with a lot of arguments. Fixes #54976. 2017-04-17 14:49:29 -04:00
Ankit Jain 12f8ebafed Empty commit to force a wrench build 2017-04-14 23:46:43 -04:00
Ludovic Henry e6a3b54b37 [WebConnection] Fix race condition between Close and BeginWrite (#4694) 2017-04-14 15:17:20 -04:00
Martin Baulig b6255d35cd [appletls]: Disable the new keychain code on XI. (#4695) 2017-04-14 14:50:36 -04:00
Alexander Kyte ff7a2e46e7 [runtime] Handle circular references in SRE types
We previously recursed through the entire directed cyclic graph
of the type passed to SRE. When given a (legal) circular type reference,
we encountered stack overflows. This was particularly easy to trigger
with fsharpi and with FAKE.

By creating everything about the type before searching for the parent,
and by defering all type hierarchy establishment until the type must be
surfaced to manage code, we tease out the data dependencies caught up in
the cycle.

Note the bounded lifetime of the unmanaged object hidden in the SRE
module, which acts as a global reference for all types reachable from
the TypeBuilder passed to the runtime through the icall.
2017-04-14 11:28:59 -04:00
David Karlaš b83bdfd396 Merge pull request #4688 from mono/bug55148
Bug 55148 - Debugger checks type which is possibly never used
2017-04-14 09:51:52 +02:00
Alexander Kyte c686827dba [runtime] Test circular references in SRE 2017-04-13 21:00:31 -04:00
Martin Baulig b9b2d23f1a [appletls]: Use SecIdentityCreate() to avoid using the Mac keychain. (#4671) (#4677)
* [appletls]: Use SecIdentityCreate() to avoid using the Mac keychain. (#4671)

Reading Certificates from the Mac Keychain
==========================================

Reading the private key from the keychain is a new feature introduced with
AppleTls on XamMac and iOS. On Desktop Mono, this new feature has several
known issues and it also did not received any testing yet. We go back to the old
way of doing things, which is to explicitly provide an X509Certificate2 with a
private key.

Keychain Dialog Popups
======================

When using Xamarin.Mac or Xamarin.iOS, we try to search the keychain
for the certificate and private key.

On Xamarin.iOS, this is easy because each app has its own keychain.

On Xamarin.Mac, the .app package needs to be trusted via code-sign
to get permission to access the user's keychain. [FIXME: I still have to
research how to actually do that.] Without this, you will get a popup
message each time, asking you whether you want to allow the app to access
the keychain, but you can make these go away by selecting "Trust always".

On Desktop Mono, this is problematic because selecting "Trust always"
give the 'mono' binary (and thus everything you'll ever run with Mono)
permission to retrieve the private key from the keychain.

This code would also trigger constant keychain popup messages,
which could only be suppressed by granting full trust. It also makes it
impossible to run Mono in headless mode.

SecIdentityCreate
=================

To avoid these problems, we are currently using an undocumented API
called SecIdentityRef() to avoid using the Mac keychain whenever a
X509Certificate2 with a private key is used.

On iOS and XamMac, you can still provide the X509Certificate without
a private key - in this case, a keychain search will be performed (and you
may get a popup message on XamMac).
2017-04-13 18:24:43 -04:00
David Karlaš d845201db4 Bug 55148 - Debugger checks type which is possibly never used 2017-04-13 20:34:01 +02:00
Zoltan Varga 10fe0e89c0 [ppdb] Fix a crash if mono_ppdb_get_seq_points () is only passed a 'source_file' argument. 2017-04-12 16:35:05 -04:00
nosami 83ca242114 Bump F# to 4.1.8 2017-04-11 12:27:35 +01:00
nosami 5309190d7d Bump F# to 4.1.8 2017-04-11 09:40:17 +01:00
nosami 98e0d8c486 Bump F# to 4.1.8 2017-04-11 07:10:42 +01:00
nosami a9d142eeb2 Bump F# to 4.1.8 2017-04-11 05:17:59 +01:00
nosami 6149b5d569 Bump F# to 4.1.8 2017-04-10 23:42:56 +01:00
Alexis Christoforides 851b6c7654 Bump for package change 2017-04-07 10:52:36 -04:00
Alexander Köplinger 6462e3fc8e Make sure .sources files end with newline
It confuses the build on Linux otherwise.

(cherry picked from commit 47ca0c0ae8)
2017-04-07 14:55:23 +02:00
Alexander Köplinger 2eced64a82 Bring in the new reference assemblies (#4619) (#4647)
This bumps the reference assemblies submodule so we can install
the new assemblies which are built from source.
(cherry picked from commit feff7ee306)
2017-04-06 01:55:39 +02:00
Vlad Brezae e6c0a86e70 [sgen] Lock around worker start, not only finishing
If we don't take the finished_lock when starting workers, the workers that we started could have already finished the work and switch to non-parallel context before we are even able to signal all of them.
2017-04-05 19:24:14 +03:00
Marek Safar ad88c52d8e Bump cecil 2017-04-05 15:59:52 +02:00
Alexander Köplinger 7e2f9aa7e8 [tests] Fix the mcs-compileall target in runtime/ (#4637)
It is used as the "verify" step on Jenkins/Wrench and I noticed
it didn't run recently.

Looks like it was broken a while ago by 695e8f53ae.
Moving the verifiable_files variable at the top is wrong since
the $$profile variable is only defined inside the for loop and
so we'd get an empty list.

When that was fixed it still didn't work as piping to `echo`
doesn't work. Replaced it with a Makefile solution instead.
(cherry picked from commit 3bfff911dd)
2017-04-05 03:36:37 +02:00
Martin Baulig dda961cf9a [appletls]: Make CFObject.dlsym() private and fix CFBoolean. (#4640) (#4641)
This fixes a native crash when attempting to use appletls.
(cherry picked from commit 989aefce37)
2017-04-04 15:47:22 -04:00
Marek Safar 55a698e07d Bump cecil 2017-04-04 11:54:40 +02:00
Marek Safar 67489264b7 [System.Core] Linker friendly test update 2017-04-04 11:03:45 +02:00
Marek Safar f23dca66a7 Bump cecil 2017-04-04 09:10:22 +02:00
Alexis Christoforides 590080c39e Bump for packaging change 2017-04-03 18:48:21 -04:00
Ankit Jain 452f94286b Empty commit to force a wrench build 2017-04-03 17:12:09 -04:00
Zoltan Varga f342dae059 [jit] Fix a regression caused by 399f6e2425. Avoid a crash if MONO_VERBOS_METHOD is used. 2017-04-03 15:01:50 -04:00
Alexander Köplinger 8fafb67859 Make monolite profile directory versioned (#4631)
If you're building with monolite currently the build system
checks for the existence of mcs/class/lib/monolite and just
uses it in that case.

It becomes a problem when bumping corlib version since if you
pull the update and try to build it'll use the old monolite
and you'll hit the "corlib version not in sync" error.

By making the monolite directory include the version this can
be avoided and everything works out of the box.

Also removed the confusing "You need Mono version 4.8 or better"
message since we actually require a newer version in
basic-profile-check.cs now and keeping them in sync is error prone.
(cherry picked from commit 500765a5d3)
2017-04-01 18:55:53 +02:00
Mikayla Hutchinson 71cc0a16c9 [System.Web] Implement HostingEnvironment.QueueBackgroundWorkItem
From reference source.

This is required for the Azure Functions Host to run unmodified.
2017-03-31 12:11:39 +02:00
Alexander Köplinger 78c2486dcb Fix Windows build
(cherry picked from commit 6f1d247060)
2017-03-31 04:18:10 +02:00
Andi McClure f47f6a1dab Merge pull request #4629 from alexanderkyte/2017-02-env
[runtime] Switch getenv to use heap memory
2017-03-30 22:12:53 -04:00
Alexander Kyte 052d1c2867 [runtime] Switch getenv to use heap memory
Getenv doesn't use heap memory, it uses static memory.
Mono's usage is consistent with a view of getenv memory contents
that are durable and can be stored and manipulated.

In a multithreaded context, getenv calls can race and corrupt
string buffers as they are read. In a single threaded context,
subsequent calls to getenv will lead to overwriting the memory
that pointers to previous calls point to.

In order to bring memory safety back, we duplicate memory and
manage it at each call-site.

Note: this changes the API semantics of g_getenv. This is necessary
because the locking around the getenv buffer is safest when confined to
the function in eglib.
2017-03-30 18:11:48 -04:00
Marek Safar bdc6fd7f03 Bump cecil 2017-03-30 17:42:46 +02:00
Marek Safar 90faddac77 Bump cecil 2017-03-30 17:29:15 +02:00
nosami 809fa3a3a8 Bump F# to 4.1.5 2017-03-30 11:08:07 +01:00
nosami 7ce4e861df Bump F# to 4.1.5 2017-03-30 10:53:29 +01:00
Zoltan Varga 4e11ba5c8b [jit] Disable SIMD support for System.Numerics, its has too many problems. 2017-03-29 19:52:15 -04:00
nosami 9dafa35db6 Bump F# to 4.1.5 2017-03-29 21:16:04 +01:00
Alexis Christoforides 51f9a82ecd Bump for F# upgrade in package 2017-03-29 12:22:50 -04:00
Marek Safar 5a3b524b60 Bump cecil 2017-03-29 10:28:17 +02:00
Zoltan Varga d4df2e7aa9 [bcl] Avoid waiting for events inside a finalizer in Process.WaitForExit () because it can hang if the thread which sets the event is aborted during shutdown. Fixes #53843. (#4609) 2017-03-28 20:38:51 -04:00
Andi McClure 4d40922fde Remove 'experimental' label from full/hybrid AOT in manpage 2017-03-28 14:14:47 -04:00
Andi McClure 082289cc15 Correctly document --aot options in man page
- Ensure all AOT options are both documented and listed in
  alphabetical order in both the manpage and --help line
- Ensure all exceptoins are commented in the aot-compiler.c source
  with "intentionally udnocumented"
2017-03-28 14:14:43 -04:00
Rolf Bjarne Kvinge ef4352cde5 [corlib] Add back X509 support for watchOS.
Otherwise we'd be regressing existing (and working) behavior.
2017-03-28 11:16:55 +02:00
Chris Hamons 9ed0907eea Disable a few x509 tests that fail on older macOS
- Handles https://bugzilla.xamarin.com/show_bug.cgi?id=53958
- https://bugzilla.xamarin.com/show_bug.cgi?id=53689 is filed to turn them
  back on later with a better version check
- SecCertificateCreateWithData handles invalid arguments differently based on
  macOS version
2017-03-28 00:01:55 +02:00
Ludovic Henry 339c5249a7 [process] Disable tests that do not work on mobile (#4598) 2017-03-27 15:21:15 -04:00
Andi McClure df9df437ae Merge pull request #4592 from lambdageek/bug-53890-2017-02
2017-02 [remoting] Pass correct object to invoke of IRemotingTypeInfo.CanCastTo
2017-03-27 15:14:54 -04:00
Ludovic Henry d15985c4af [threadpool] Fix #53481 (2nd attempt) (#4597)
This will leak on shutdown, and it is to prevent https://bugzilla.xamarin.com/show_bug.cgi?id=53481
2017-03-27 13:37:42 -04:00
Ludovic Henry 98a9c23d70 [threadpool] Fix #53481 (#4593) 2017-03-25 23:52:59 -04:00
Aleksey Kliger 4b82d60bbc [remoting] Pass correct object to invoke of IRemotingTypeInfo.CanCastTo
Pass the payload of the coop handle as the 'this' object, not the handle
itself.

Add asserts in ves_icall_Remoting_RealProxy_InternalGetProxyType that
remote_class and the proxy_class are non-NULL.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53890
2017-03-24 18:53:04 -04:00
Ludovic Henry c3452996bd [threadpool-io] Ensure selector thread is running before waiting on it (#4582)
This could result in a unecessary wait on shutdown where the selector thread would have exited, and the finalizer thread would try to dispose a Socket, which would try to remove the socket from the IOSelector. This removal operation would wait on the selector thread to acknowledge the removal, but because the selector thread would have alreday exited, we would wait on an event that would never happen.
2017-03-24 15:57:40 -04:00
Andi McClure 65d1d7cdae Improve "Could not resolve type with token" exception message 2017-03-24 14:43:17 -04:00
Andi McClure d424096c05 Empty commit to kick builders 2017-03-24 12:28:23 -04:00
Vlad Brezae 6d11ff42da [runtime] Don't reset abort exception in invoke wrapper
It leads to missing self aborts on full-aot.
2017-03-24 16:26:15 +02:00
Vlad Brezae 1c7614193f [runtime] Improve debugging of thread interruptions 2017-03-24 16:25:52 +02:00
Vlad Brezae be6441b30d [runtime] Defer async requests during abort protected blocks
We avoid unnecessary checks for each interruption checkpoint.
2017-03-24 16:25:38 +02:00
Vlad Brezae 66f8f1aa53 [runtime] Fix detecting abort at end of abort protected block
If we have a pending abort then we know we will have the thread_state set and the thread_interruption_requested bumped. We used to consume this request and set the MonoError with the exception. The problems with this is that not all callsites handle the passed MonoError and handling it means converting it back to a pending exception anyway. We just leave the interruption request untouched now.

If the cctor self aborts it means that we consumed the abort exception so we do need to call mono_thread_resume_interruption to reactivate it. We need to make sure that we still don't throw a TypeInitializationException if we had a self abort.
2017-03-24 16:25:26 +02:00
Vlad Brezae a5c496fd46 [runtime] Fix missing abort during abort protected regions
When aborting a thread we set the thread's interruption request and we also increment the global interruption request. If we were trying to abort a thread when it is in an abort protected region, it will just set an interruption deferred and not do anything else (in async_abort_critical). When the thread exited the abort protected region, it was missing the abort request since we didn't increment the global interruption request.

Refactor thread_interruption_requested modifications, making sure we always bump it when requesting an interruption and decrease it when we clear an interruption.
2017-03-24 16:25:12 +02:00
Vlad Brezae b92bdff265 [runtime] Rework abort deferring
The problem with previous implementation was that we were not able to account for two pending exceptions at the same time, since when we execute an interruption request we clear all the state and there is no clear way to account for two exceptions at the same time. This means that, if we have a pending abort in a cctor, all exception handling inside the cctor will be broken (for the provided test case we were only throwing the cctor internal exception outside of it).

In order to fix this, we split into two types of interruptions SYNC and ASYNC (in order to separate mainly between abort and pending exceptions). Sync interruptions are interruptions requested by the thread itself (pending exceptions and self aborts) and they are processed as soon as possible. Async interruptions are requested by other threads (abort, interrupt, suspend) and we defer them as we were doing before (we have a deferred interruption if we have an async exception and abort block count is non zero).
2017-03-24 16:24:56 +02:00
Vlad Brezae d27cc030bb [runtime] Fix interruption deferring
We were accidentally clearing the interruption deferred flag when exiting from nested abort protected regions.
2017-03-24 16:24:42 +02:00
Zoltan Varga 5f5f25f58a [bcl] Add a finalizer to MemoryMappedFile. 2017-03-24 09:37:40 -04:00
Martin Baulig 0d0be3e704 [AppleTls]: Use correct definition of SecTrustResult. (#4586)
* [AppleTls]: Use correct definition of `SecTrustResult`.

We need all the values in this enum because `SecTrustResult.Unspecified`
means success - which currently has an integer value of 4, not 0.

* Oops, make it build.

* Don't make it public.

* Revert whitespace change.

(cherry picked from commit 4638c98ba0)
2017-03-23 17:04:31 -04:00
Andi McClure 414feeffc7 Bump version to 5.0.0 2017-03-23 16:23:59 -04:00
Aleksey Kliger 06060e290d [reflection] Set correct reflected type in MonoMethod.get_base_method
It can be the case that we have two different System.MonoMethod objects that both
point to the same native MonoMethod* but have two different reflected types.
(For example if we call derivedType.GetMethod("f") where f is virtual and
derivedType corresponds to a class that did not override a base definition.  In
that case, the MonoMethod* corresponds to the parent type's f method, but the
reflected type is derivedType)

In this case, GetBaseDefinition will return the same MonoMethod* but the
reflected type of the result should be the base type, not the derived type.
2017-03-23 10:32:05 -04:00
Aleksey Kliger 37a593df33 [tests] Additional tests of System.Reflection.MethodInfo.GetBaseDefinition 2017-03-23 10:32:05 -04:00
Aaron Bockover c34e267b4c csharp: support command line arguments for scripts
This adds a command line argument preprocessor that splits command line
arguments into two groups, delimited by the "standard" `--` "stop
processing" argument, or by the `-s` argument which can be used with
Unix shebang syntax (where the path of the file being executed will
be appended to the command line specified on the shebang line).

- anything before `--` or `-s` will be passed to mcs/csharp as usual
- anything after `--` or `-s` will _not_ be processed by mcs/csharp,
  and will be made available in an `Args` builtin, like `csi`

This _finally_ (after almost 10 years) allows `csharp` to be used for
proper script authoring!

Document the new arguments in the man page. Also remove references to
'gsharp' from the man page.
2017-03-23 10:18:47 +01:00
Chris Hamons 582b140f7d AppleTls Support (#4470)
(cherry picked from commit 4d1e45d76a)
2017-03-23 00:10:39 +01:00
Marek Safar 16c75ce329 [xbuild] Copy csc/mcs GC settings to xbuild script 2017-03-22 23:14:39 +01:00
Zoltan Varga 72eabfe658 [ppdb] Avoid asserting on ppdb images without a guid heap. 2017-03-22 12:12:06 +01:00
Marek Safar c8e14aa2ea Bump cecil 2017-03-22 10:12:38 +01:00
Zoltan Varga ffcc54965d [runtime] Fix another typo in get_errno_from_g_file_error (). 2017-03-22 04:21:59 -04:00
Zoltan Varga 2d56aa09df [runtime] Fix a typo causing an assert in get_errno_from_g_file_error (). Fixes #53684. 2017-03-22 04:21:53 -04:00
Marek Safar ac26b00ca4 Fixes build 2017-03-21 01:30:46 +01:00
Marek Safar f77c835faf [System] Fix Process tests on watch 2017-03-20 23:58:18 +01:00
Marek Safar e319507866 [System.Core] Update mobile test 2017-03-20 23:09:47 +01:00
Rodrigo Kumpera cd5d8a9d1b Merge pull request #4553 from kumpera/backport-block-rebind-of-banned-assemblies
Backport of the rebind bans
2017-03-20 16:27:58 -04:00
Zoltan Varga 5eae4df2ee [arm64] Fix the DISABLE_JIT build. 2017-03-20 07:47:00 -04:00
Alexander Köplinger 9ecfd9f23a [WinForms] Fix test build 2017-03-18 03:17:31 +01:00
Zoltan Varga 37de1b5b0d [arm] Fix the DISABLE_JIT build. 2017-03-17 19:05:59 -04:00
Rodrigo Kumpera 68392d0c90 [runtime] Remove debug spew. 2017-03-17 13:31:47 -07:00
Rodrigo Kumpera 715991f427 [runtime] Remove debug leftover and have mono_assembly_is_problematic_version actually work. 2017-03-17 13:31:43 -07:00
Ankit Jain 503f379a22 Handle windows paths in ResXFileRef, for conversion to string case
- convert the path a little earlier to handle the case for conversion to
  string
- Fixes earlier commit a3195b79f6
- And enable the corresponding test
2017-03-17 15:22:32 -04:00
Ankit Jain a36202bfea Handle a file ref, with backslashes, in a .resx, on a non-windows system
File ref of the form:

```xml
  <data name="foo" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\foo.json;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </data>
```
2017-03-17 15:22:23 -04:00
Rodrigo Kumpera bbf84b172e [tools] Dep check the downloads to avoid the mistake fixed by the previous commit. 2017-03-17 11:46:48 -07:00
Rodrigo Kumpera 62a0e75dd8 [runtime] Update the banned version list to include SRDP and SVT. 2017-03-17 11:46:47 -07:00
Rodrigo Kumpera 80e1e3a964 [tools] Update nuget-hash-extractor to spew the new ban table. 2017-03-17 11:46:43 -07:00
Rodrigo Kumpera 303981e264 [runtime] Reject rebinds that target one of the banned assemblies.
The matching is done by name and version. We don't check pubkey or MVID.
2017-03-17 11:45:59 -07:00
Marek Safar 05ff99fc73 [System] Add back empty MonoTouch namespace 2017-03-17 14:09:44 +01:00
Zoltan Varga 24e82a5385 [x86] Disable the usage of mono_lmf on android as a workaround. 2017-03-16 19:06:52 -04:00
Zoltan Varga cd2579f7ce [x86] Remove some incorrect code from method prologs which clobbers the return value. 2017-03-16 18:57:17 -04:00
Alexander Köplinger 760ac86dd9 Move target for creating monolite package to Mono
(cherry picked from commit 622840da56)
2017-03-16 21:49:18 +01:00
Alexander Köplinger 2b14612b1c Include Mono version in corlib version
This makes it possible to version the runtime<->corlib interface
for each version branch independently and fixes the problem
of monolite getting overwritten by changes in different branches
when corlib version is still the same.

We're moving definition of the corlib version into configure.ac
so we can more easily bake the Mono version into it.

(cherry picked from commit c0dd559ee4)
2017-03-16 21:49:12 +01:00
Alexander Köplinger 94ced23f9a Revert "Include Mono version in corlib version"
This reverts commit b600314281.

A better version is coming in the next commit.
2017-03-16 21:46:47 +01:00
Vlad Brezae 66905636c1 [sgen] Fix xmm scanning on mac x86 (#4521)
The MonoContext (which sgen scans) did not have its fpregs populated, even though we were fetching the fpstate.
2017-03-16 01:07:09 +02:00
Jon Purdy 2fb26892dc Fix XMM scanning on Mac x86.
MONO_CONTEXT_GET_CURRENT needed to be updated.
2017-03-16 01:07:04 +02:00
Zoltan Varga 4b62516d17 [simd] Fix some problems exposed by the corefx test suite. (#4531) 2017-03-15 05:13:16 -04:00
Zoltan Varga d78c35091b [jit] Add parameter type checks to the SIMD intrinsics to make sure we are handling the proper methods. Fixes #53278. (#4520) 2017-03-15 05:13:10 -04:00
Zoltan Varga 836896684c [arm64] Fix the saving/restoring of fp regs in exception filters, we were saving/restoring them from the incorrect position in MonoContext.fregs. (#4499) 2017-03-15 05:12:52 -04:00
Alexander Köplinger 9528721b39 [tools] Don't install mdb2ppdb by default (#4526)
(cherry picked from commit 294148d27d)
2017-03-14 19:41:37 +01:00
Andi McClure eff6063589 Move RunningOnUnix symbol outside #if MONO_FEATURE_PROCESS_START in test
Fixes build on Android
2017-03-14 11:17:31 -04:00
Alexander Köplinger b600314281 Include Mono version in corlib version
This makes it possible to version the runtime<->corlib interface
for each version branch independently and fixes the problem
of monolite getting overwritten by changes in different branches
when corlib version is still the same.
2017-03-14 02:19:17 +01:00
Marek Safar a5808f9c71 [corlib] FileStream::Name needs to include fully qualified normalized name. Fixes #53231 2017-03-12 10:00:22 +01:00
Marek Safar 785c82b5d1 [corlib][Mono.Posix] Remove NunitHelpers.cs reference 2017-03-10 14:52:07 -05:00
Rodrigo Kumpera dcc3c6090b Merge pull request #4498 from kumpera/backport-android-fix
[runtime] Make sure we use lower numbered signals on Android.
2017-03-09 14:13:01 -08:00
Rodrigo Kumpera 08f150b1d9 [runtime] Make sure we use lower numbered signals on Android.
Android on 32bits arm shipped broken headers that made sigset_t be 32 bits instead of 64.

This means that it's not possible to use signals whose value are >= 32. The default implementation
uses RT signals when available (and they are on Android). But RT signals don't work as expected
as their value is >= 32.

This fix hardcodes some safe signals on Android and add asserts about their values to avoid regressions.

See 5005c6f3fb for more details.
2017-03-09 13:19:23 -08:00
Zoltan Varga a417e02c2d [arm] Implement aot support for handler block trampolines. 2017-03-09 15:37:32 -05:00
Zoltan Varga 1a1d71d808 [arm64] Implement aot support for handler block trampolines. 2017-03-09 15:37:28 -05:00
Marek Habersack 152e22549b [mkbundle] Encode directory separator character on Windows (#4493)
When storing satellite assemblies, mkbundle prefixes their names with a
directory name derived from the language/locale of the assembly. It uses the
platform's default directory separator character which on Windows defaults to
'\' and that causes problems when building such a bundle on Windows since \ is
an escape sequence prefix inside strings and not escaping it with another \
leads to gcc errors when building the genrated source.

This commit fixes the problem by quoting the directory separator character
properly on Windows.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52845
2017-03-09 10:32:43 -05:00
Ludovic Henry ae2e60c61c [process] Allocate a handle even for non-child processes (#4393) 2017-03-08 21:07:19 -05:00
Ludovic Henry 9f78eca1af [threads] Fix async call in coop (#4423)
We would observe crashes like the following:

```
 * Assertion at mono-threads.c:1009, condition `mono_thread_info_run_state (info) == STATE_ASYNC_SUSPENDED' not met

 Debug info from gdb:

 [New LWP 26793]
 [New LWP 26792]
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 0x00002b0ff3481ee9 in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
   Id   Target Id         Frame
   3    Thread 0x2b0ff3e6c700 (LWP 26792) "SGen worker" 0x00002b0ff347e414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
   2    Thread 0x2b0ff633e700 (LWP 26793) "Finalizer" 0x00002b0ff347e414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
 * 1    Thread 0x2b0ff2b67c40 (LWP 26780) "mono" 0x00002b0ff3481ee9 in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0

 Thread 3 (Thread 0x2b0ff3e6c700 (LWP 26792)):
 #0  0x00002b0ff347e414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
 #1  0x0000000000661bdf in mono_os_cond_wait (mutex=0x9dee40 <lock>, cond=0x9dee00 <work_cond>) at ../../mono/utils/mono-os-mutex.h:146
 #2  thread_func (thread_data=0x2b0ff2bcb008) at sgen-thread-pool.c:129
 #3  0x00002b0ff347a182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
 #4  0x00002b0ff39a130d in clone () from /lib/x86_64-linux-gnu/libc.so.6

 Thread 2 (Thread 0x2b0ff633e700 (LWP 26793)):
 #0  0x00002b0ff347e414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
 #1  0x00000000005caff3 in mono_os_cond_wait (mutex=<optimized out>, cond=<optimized out>) at ../../mono/utils/mono-os-mutex.h:146
 #2  mono_coop_cond_wait (mutex=<optimized out>, cond=<optimized out>) at ../../mono/utils/mono-coop-mutex.h:87
 #3  mono_threadpool_io_remove_socket (fd=134239440) at threadpool-io.c:628
 #4  0x00000000005ae4f4 in ves_icall_System_Net_Sockets_Socket_Close_internal (sock=42, werror=<optimized out>) at w32socket.c:708
 #5  0x0000000041e8101f in ?? ()
 #6  0x00002b1014abe070 in ?? ()
 #7  0x0000000001615860 in ?? ()
 #8  0x0000000001615860 in ?? ()
 #9  0x0000000000000000 in ?? ()

 Thread 1 (Thread 0x2b0ff2b67c40 (LWP 26780)):
 #0  0x00002b0ff3481ee9 in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
 #1  0x00000000004ac5e6 in mono_handle_native_crash (signal=<optimized out>, ctx=<optimized out>, info=<optimized out>) at mini-exceptions.c:2557
 #2  <signal handler called>
 #3  0x00002b0ff38dcf79 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #4  0x00002b0ff38e0388 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #5  0x000000000066b459 in mono_log_write_logfile (log_domain=<optimized out>, level=<optimized out>, hdr=<optimized out>, message=<optimized out>) at mono-log-common.c:137
 #6  0x00000000006805e0 in monoeg_g_logv (log_domain=log_domain@entry=0x0, log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7ffc7324ea78) at goutput.c:115
 #7  0x0000000000680736 in monoeg_assertion_message (format=<optimized out>) at goutput.c:135
 #8  0x00000000006759b8 in mono_thread_info_setup_async_call (info=info@entry=0x2b0ff80008c0, target_func=target_func@entry=0x5bac20 <suspend_for_shutdown_async_call>, user_data=user_data@entry=0x0) at mono-threads.c:1009
 #9  0x00000000005bad50 in suspend_for_shutdown_critical (info=info@entry=0x2b0ff80008c0, unused=unused@entry=0x0) at threads.c:5019
 #10 0x00000000006763ae in mono_thread_info_safe_suspend_and_run (id=47347555100416, interrupt_kernel=interrupt_kernel@entry=0, callback=callback@entry=0x5bad40 <suspend_for_shutdown_critical>, user_data=user_data@entry=0x0) at mono-threads.c:979
 #11 0x00000000005c2e71 in mono_thread_internal_suspend_for_shutdown (thread=<optimized out>) at threads.c:5028
 #12 0x00000000005e9100 in mono_gc_cleanup () at gc.c:1015
 #13 0x00000000005e108e in mono_runtime_cleanup (domain=domain@entry=0x1615860) at appdomain.c:423
 #14 0x00000000004228cb in mini_cleanup (domain=0x1615860) at mini-runtime.c:4111
 #15 0x000000000047b99f in mono_main (argc=10, argv=<optimized out>) at driver.c:2167
 #16 0x00000000004200db in mono_main_with_options (argv=0x7ffc7324ef68, argc=10) at main.c:45
 #17 main (argc=10, argv=0x7ffc7324ef68) at main.c:338

 =================================================================
 Got a SIGABRT while executing native code. This usually indicates
 a fatal error in the mono runtime or one of the native libraries
 used by your application.
 =================================================================
```
2017-03-08 21:07:19 -05:00
Ludovic Henry 8cbef676c3 [threads] Ensure we have balanced appdomain push/pop when attaching the thread on shutdown (#4416) 2017-03-08 21:07:19 -05:00
Ludovic Henry 724c7df79c [threadpool] Do not swallow exception in RegisterWaitForSingleObject callback (#4408) 2017-03-08 21:07:19 -05:00
Ludovic Henry 15e53eba9b [socket] Fix bad parameter passed to select (#4390)
If fd is equals to FD_SETSIZE, then we pass (FD_SETSIZE + 1) as first parameter to select, making it return EINVAL.
2017-03-08 21:07:19 -05:00
Ludovic Henry 7323343a64 [socket] Fix race on SocketAsyncResult (#4389)
It might be possible that the callback modifies the current SocketAsyncResult via the Init method. We observe it with AcceptAsync with a ReceiveAsync in the callback.
2017-03-08 21:07:19 -05:00
Ludovic Henry c69dae3bcb [finalizer] Suspend finalizer thread on after shutdown timeout (#4363)
Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=52429
2017-03-08 21:07:19 -05:00
Ludovic Henry 661495317c [threads] Make OSEvent alertable to fix bug #51653 (#4347) 2017-03-08 21:07:19 -05:00
Ludovic Henry 2415374524 [threads] Allow resetting the name of a threadpool thread (#4350)
Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=47221
2017-03-08 21:07:19 -05:00
Zoltan Varga fa1030da6f [offsets-tool] Remove dependencies on android directory layout by adding a --targetdir=dir argument argument which points to the mono build directory corresponding to the target abi. Only allow one --abi= argument on android. (#4487) 2017-03-08 12:05:20 -05:00
Rodrigo Kumpera a17a84caee [loader] When loading the parent of a GTD fails. We must disable gclass recording for it.
mono_class_create_from_typedef: When loading a GTD, we track what ginsts' of it were loaded in the meanwhile
so we can fix some information that will be wrong (such as if it's a VT or not).

Were not stopping the recording when a GTD type failed to load its parent. This would result in *A LOT* of ginsts
being captured and would cause issues during domain unload.
2017-03-07 15:01:10 -08:00
Zoltan Varga 44560f1e67 [arm64] Fix the passing of small arguments on the stack in the gsharedvt trampoline, the calculation of their stack offset was incorrect in two places. Fixes #52866. 2017-03-07 01:54:09 -05:00
Zoltan Varga c52c4bd713 [jit] Remove an #ifdef ENABLE_LLVM from mini-os.h, the cross-compile genmdesc.pl can't handle it. 2017-03-06 15:56:21 -05:00
Zoltan Varga c8ca5929c7 [linker] Update the mscorlib descriptor with missing generic interfaces. 2017-03-06 15:56:21 -05:00
Zoltan Varga d60a36ee80 [ssa] Fix an assertion if the buffer used to keep renaming history gets full. 2017-03-06 15:56:21 -05:00
Zoltan Varga cee57b3c78 [runtime] Fix the reflected type of Delegate.Method if the method is an inherited virtual method. Fixes #39444. (#4353) 2017-03-06 15:56:21 -05:00
Zoltan Varga fe75a6ee2f [lldb] Avoid a crash with the mono_tramp_info_register () call in load_aot_module (). 2017-03-06 15:56:21 -05:00
Zoltan Varga 65956a952d [arm] Use TARGET_IOS instead of __APPLE__ so we don't use the ios abi when cross compiling from osx to android. 2017-03-06 15:56:21 -05:00
Andi McClure b6b7ce3eff Bump mono to 4.9.3 to force builders to pick up csc fixes 2017-03-06 13:06:31 -05:00
Alexander Köplinger e6409c5953 [cert-sync] Don't import into BTLS store if BTLS is not available (#4475)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53015
(cherry picked from commit fb4d198131)
2017-03-06 12:07:20 +01:00
Zoltan Varga 2cc99a1681 [jit] Fix an assert in mono_unwind_ops_encode_full () caused by an off-by-one error. Fixes #53066. 2017-03-06 02:33:17 -05:00
Zoltan Varga d8b4f5d2ab [runtime] Add fastpaths to the stelem wrappers for the case when the array element type and the value type are the same. (#4427) 2017-03-06 02:33:09 -05:00
Zoltan Varga 0c315e92b0 [runtime] Speed up mono_icall_start()/mono_icall_end() a bit by using inline versions of the MonoError functions. (#4424) 2017-03-06 02:33:09 -05:00
Zoltan Varga 5d7e4c9cf6 [runtime] Use mono_debug_method_lookup_location () instead of mono_debug_symfile_lookup_location (), the latter doesn't support portable pdb files. Use mono_debug_free_source_location () for freeing. Fixes #52899. (#4457)
(cherry picked from commit 4d7109cceb)
2017-03-05 00:15:26 +01:00
Vincent Povirk 23fb3fe800 [metadata] Fix a possible crash when looking up a p/invoke function. (#4471)
It's possible for two threads to modify the same MonoMethodPInvoke.addr
in mono_lookup_pinvoke_call, with one thread setting it to NULL inside the
loop, and the other thread having completed the loop and expecting it to
be non-NULL.

Use an intermediate variable to prevent addr becoming non-NULL.
2017-03-04 16:55:01 -05:00
Rodrigo Kumpera 679777b17b Merge pull request #4464 from kumpera/backport-4454-2017-02
Backport of #4454 to 2017-02
2017-03-02 21:10:14 -05:00
Zoltan Varga f0c0314e4d [runtime] Fix an infinite loop in the runtime class init code. (#4455)
The following can happen:
* Thread T1 starts initialization of C1
* Thread T2 starts initialization of C2
* T2 starts initialization of C1, it gets blocked on T1.
* T1 finishes initializing C1.
* T1 starts initialization of C3.
* T1 starts initialization of C2. It sees that T2 is
  still blocked on T1, but its not actually blocked, since
  C1 is finished. Still, we record that T1 is blocked.
* T3 starts initialization of C2, it gets into an infinite
  loop in the while loop, since the blocked_thread_hash
  now indicates that T1 and T2 are blocked on each other.

The solution is to not mark a thread as blocked, if its waiting
for a thread which is waiting on a finished lock. Fixes hangs
when running csc.
2017-03-02 17:02:28 -05:00
Rodrigo Kumpera 10ee1bafc9 [loader] Revert allowing SIOC 4.3. This is fine for now as we support LoadFrom as a work-around. 2017-03-02 11:48:07 -08:00
Rodrigo Kumpera bceca5b359 [loader] Pass LoadFrom down to image loading so we can make decisions based on that. 2017-03-02 11:47:29 -08:00
Rodrigo Kumpera 4560d3c57f Pass LoadFrom info down to assembly loading. 2017-03-02 11:47:29 -08:00
Rodrigo Kumpera 1c41089315 [runtime] SIOC 4.3.0 has a managed impl that works under mono. Don't ignore it. 2017-03-02 11:47:28 -08:00
Rodrigo Kumpera cb922c0fa6 Merge pull request #4442 from kumpera/fix-assembly-remapping-2017-02
Backport of #4440
2017-02-28 12:23:08 -08:00
Rodrigo Kumpera fe9c5ebe97 [runtime] Fix assembly remapping by using a hashtable. Fixes #52846 and #52743
In multiple occasions we had bugs due to framework_assemblies not being correctly sorted.

Instead of just fixing the ordering again, I'm moving it a hashtable so future generations won't have to fix this for System.SpaceTravel.dll.
2017-02-27 17:09:29 -08:00
Andi McClure 51403d818e Fix monodis
monodis was not calling the mono_tls_init_runtime_keys function, which
was causing it to crash the first time it attempted to access the
current domain (ie almost immediately).
2017-02-27 15:54:05 -05:00
Rodrigo Kumpera 459d47bb9b [jit] Fix LMF codegen on android arm64.
Android doesn't have fast tls either, so we must use the jit_tls variant.
2017-02-27 12:47:55 -08:00
Vlad Brezae 63dde6cce0 [threads] Don't ignore abort requests in abort protected blocks
Either interrupt or set the interrupt_deferred flag, so the thread can handle the request later in the future. Otherwise we are left with a thread that has an AbortRequested set on its state that it is never processed and future abort requests are ignored due to the presence of this flag.
2017-02-27 22:07:04 +02:00
Vlad Brezae 640d5a03e4 [sgen] Throw OOM also from the managed allocator
Allocation functions from object.c correctly throw OOM when sgen allocation returns NULL. When allocating with the managed allocator we invoke sgen directly (as a fallback) and we didn't handle the NULL return case.

Fixes #52437
2017-02-24 22:19:18 +02:00
Vlad Brezae 19b866517a [sgen] Rename confusing variable 2017-02-24 22:19:16 +02:00
Marek Safar 8953abc7d3 Fixes windows po/ build
(cherry picked from commit 8e7cae914b)
2017-02-24 16:35:45 +01:00
Marek Safar b78f4f6e5f [Mono.Data.Sqlite] Change default datetime convert format to excluded datetime kind. Fixes #46929 2017-02-24 16:19:49 +01:00
Alexander Köplinger 9bd54596bb Force LF line endings for .sources and Makefiles too
This should fix the Windows build.

(cherry picked from commit a7bed9a7fc)
2017-02-24 11:20:34 +01:00
Alexander Köplinger 74d31d88ef Fix Windows build due to line ending changes in sed
The recent sed update in cygwin [1] changed the way sed handles
carriage returns. This meant that every .in file we processed
still contained CR, which doesn't work for .sh files.

Force LF line endings for those files (and also other shell scripts).

[1] https://cygwin.com/ml/cygwin-announce/2017-02/msg00036.html

(cherry picked from commit 8d0e921d8b)
2017-02-24 11:20:26 +01:00
Zoltan Varga d66823b37b [runtime] Avoid holding the init lock while calling the cctor in mono_runtime_class_init (), its not needed any more. (#4361) 2017-02-23 17:57:03 -05:00
Zoltan Varga f01f6476b5 [arm] Fix the passing of structs with 8 byte alignment with llvm on armeabi, they need to be passed as an int64 array to let llvm know that it might need to insert a dummy argument so they are passed in a even register pair. Fixes #52548. 2017-02-22 15:09:23 -05:00
Zoltan Varga bcf75c0b8c [runtime] Use TARGET_WIN32 instead of HOST_WIN32 when setting calling conventions, so cross compilers running on windows do the right thing. (#4412) 2017-02-22 12:49:27 -05:00
Zoltan Varga 84b7173fcb [runtime] Fix mono_bitset_count () so it works on win64 as well. (#4413) 2017-02-22 12:48:11 -05:00
Marek Safar 2b673c3022 [System] Test fix for watch 2017-02-22 10:39:27 +01:00
Andi McClure ff9ce3b7ff Bump version number to 4.9.2 because of msbuild/xbuild compatibility changes. 2017-02-21 14:07:19 -05:00
Marek Safar 97056ba86a Bump cecil 2017-02-21 17:41:09 +01:00
Zoltan Varga ceaa04d0b8 [jit] Fix support for gsharedvt constrained calls which return enums. Fixes #52600. 2017-02-18 16:37:59 -05:00
Ankit Jain 87a92c89c2 [xbuild] Show the deprecation notice with logo, and so hide it with
`/nologo`. It is not controlled by logging levels now.
But we also show the deprecation notice if we couldn't parse
the arguments, which would be more likely to be noticed by a user.
2017-02-17 13:22:47 -05:00
Andi McClure de1a4a0229 Back out 6fbe05fe9, we will decide on version number format changes later 2017-02-17 11:58:00 -05:00
Ankit Jain 2f1bfa9788 [xbuild] Don't show the deprecation notice for minimal or quiet logging
.. levels. This is useful for scripts that might depend on minimal/quiet
levels, to parse output of a specific target execution, eg.
Xamarin.Android .
2017-02-16 17:08:06 -05:00
Ludovic Henry 6caddcd9d1 [socket] Add EPROTOTYPE error case (#4391)
Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=52549
2017-02-16 14:07:49 +01:00
Rodrigo Kumpera 8a3e2b11e1 Merge pull request #4376 from kumpera/test-hardneing
Disable some flaky tests and harden another one.
2017-02-16 11:06:26 +01:00
Alexander Köplinger e2fa30543b [System] Fix failing ClientWebSocket test
The wrong part of the ifdef was deleted in a4df7d4923,
we need to InvalidOperationException instead of PNSE.

(cherry picked from commit ed685e8b76)
2017-02-16 03:57:33 +01:00
Marek Safar 8a113e88b3 [System] Fixes failing tests on mobile 2017-02-16 00:04:52 +01:00
Marek Safar d8e522c16c Revert "[Facades] Update netstandard facade to latest"
This reverts commit 171ba52158.
2017-02-15 17:45:50 +01:00
Alexander Köplinger e476b1ac33 [man] Remove outdated version numbers (#4382)
We haven't been consistent in keeping those version numbers
up to date as we bump Mono's version so it's less confusing
to not show them in the manual pages.

`mono --version` is and has been the source of truth.
(cherry picked from commit b117a53b8f)
2017-02-15 17:01:54 +01:00
Marek Safar 6fbe05fe9a Update version number 2017-02-15 13:19:47 +01:00
Marek Safar 440cd5475c [Mono.CodeContracts] Read debug symbols only when they are going to be used 2017-02-15 13:05:21 +01:00
Marek Safar dc34ec682c Cecil update 2017-02-15 13:04:49 +01:00
Alexander Köplinger 9deeb95816 [System.ServiceModel.Internals] Use the mobile sources for testing_aot_full and orbis profile (#4378)
(cherry picked from commit 17c5a00c59)
2017-02-14 22:14:10 +01:00
Alexander Köplinger 171ba52158 [Facades] Update netstandard facade to latest
Includes latest changes from dotnet/standard repo.

(cherry picked from commit 4e54ac3d4b)
2017-02-14 03:43:30 +01:00
Marek Safar 4393b68452 [System.Net.Http] Allow re-sending StreamContent. Fixes #52448 2017-02-13 22:39:10 +01:00
Zoltan Varga 76da2e9ed8 [jit] Disable llvm for overly complex methods, to avoid compilation slowdowns. Fixes #52475. 2017-02-13 14:46:37 -05:00
Marek Safar 5006bcc901 [System] Fixes failing tests on watch 2017-02-13 12:50:48 +01:00
Martin Baulig 50c26943d4 [btls]: Partial merge of #4318 and #4337. (#4345)
* [btls]: Partial merge of #4318 and #4337.

Partially merged commits 4ecb683 and 4c6c6f0 from master without adding
'MonoTlsSettings.CertificateSearchPath'.

* Add MonoBtlsProvider.SetupCertificateStore(MonoBtlsX509Store,MonoTlsSettings,bool)
  overload, which adds 'settings.TrustAnchors' if applicable.

* MonoBtlsContext: call it instead of having our own custom implementation.

* [btls]: Fix MonoBtlsX509Store.cs.AddTrustedRoots(). (#4340)

This internal method is only called from Mono.Btls.Interface.BtlsStore
and used by the web-tests.

Call MonoBtlsProvider.SetupCertificateStore(store) to make its
behavior consistent with the internal implementation.
(cherry picked from commit 8b18c84289)

* [btls]: Partial merge of #4318, #4337 and #4340.

Partially merged commits 4ecb683, 4c6c6f0 and 8b18c84 from master
(without adding 'MonoTlsSettings.CertificateSearchPath').

* Add MonoBtlsProvider.SetupCertificateStore(MonoBtlsX509Store,MonoTlsSettings,bool)
  overload, which adds 'settings.TrustAnchors' if applicable.

* MonoBtlsContext: call it instead of having our own custom implementation.

* Fix MonoBtlsX509Store.cs.AddTrustedRoots(). (#4340)

  This internal method is only called from Mono.Btls.Interface.BtlsStore
  and used by the web-tests. Call MonoBtlsProvider.SetupCertificateStore(store)
  to make its behavior consistent with the internal implementation.
2017-02-13 11:25:02 +01:00
Marek Safar 5596255efe Bump roslyn to rc4 2017-02-13 09:24:18 +01:00
Alexander Köplinger a41069ad76 [tools] Install pdb files for security tools (#4364)
We don't use the global executable.make install logic for the tools
in security so we missed updating this to copy .pdb's as well.
(cherry picked from commit b17ddc5c15)
2017-02-10 20:56:38 +01:00
Alexander Köplinger f70bda0c06 [Mono.Security] Check NewLocalMachinePath too for deciding if store is machine store (#4357)
The code in X509Store only checked the legacy X509StoreManager.LocalMachinePath
when deciding whether CspProviderFlags.UseMachineKeyStore should be
set when dealing with private keys.

However, with BTLS we now also have X509StoreManager.NewLocalMachinePath.

This caused an issue/regression in the recent 4.8 builds that
started importing into the BTLS cert store when using cert-sync:
https://github.com/mono/mono/commit/968c60a0f32c7a4c92568c3feda7503f99b98c94

Because cert-sync is ran at package installation time as root
on Linux we would erroneously not pass UseMachineKeyStore (because
the paths between legacy and BTLS store are different), which in turn
causes KeyPairPersistence to look into the user directory, e.g.
~/.config/.mono/keypairs. Since on a clean machine that directory
hierarchy doesn't exist, it goes on and creates it -> we now have
the ~/.config directory owned by root which means a normal user
application can't write to it anymore (like NuGet) and crashes.

The fix is to check for the BTLS store path as well so KeyPairPersistence
uses the machine path and ~/.config is not created on package installation.

See e.g. https://github.com/travis-ci/travis-ci/issues/7271
(cherry picked from commit 12b44a0e94)
2017-02-09 18:31:30 +01:00
Alexander Köplinger 3ed19e6630 [ci] Temporarily use http url to download server until cert is fixed
(cherry picked from commit 9281d4a7e6)
2017-02-09 18:29:33 +01:00
Ludovic Henry f404e04d6d [process] Fix Process.GetProcessesByName (#4351)
To get a process by name, we need to access the other process ProcessName, but it can fails on non-win32 platforms. This failure wouldn't be caught in the referencesource implementation trigerring this bug.

The exception we would observe would be:
 Unhandled Exception:
 System.InvalidOperationException: Process has exited, so the requested information is not available.
   at System.Diagnostics.Process.get_ProcessName () [0x0002d] in /Users/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:336
   at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
   at Program.Main (System.String[] args) [0x0003b] in <9c838a66cdc44c81b38c974edcc9c029>:0
 [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Process has exited, so the requested information is not available.
   at System.Diagnostics.Process.get_ProcessName () [0x0002d] in /Users/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:336
   at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
   at Program.Main (System.String[] args) [0x0003b] in <9c838a66cdc44c81b38c974edcc9c029>:0

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=52345
2017-02-09 11:45:10 +01:00
Marek Safar 6019eeb483 [xbuild] Add deprecation warning 2017-02-07 23:29:40 +01:00
Martin Baulig e37d7a2ce9 [btls]: MonoBtlsError.GetError(out string, out int) returns 0, not null. (#4338)
(cherry picked from commit d3aa5f9504)
2017-02-07 22:28:16 +01:00
Zoltan Varga 2440b14865 [runtime] Add a workaround for #50529 by locking around pthread_create()/pthread_join () calls so they can't happen at the same time. (#4332) 2017-02-07 16:14:32 -05:00
Ludovic Henry 4f4cb919cf [threadpool] Fix hang on threadpool cleanup (#4331)
Waiting for the threadpool threads to exit on shutdown triggers a hand. The simplest solution is to not wait for them, and let the general runtime shutdown mechanism wait for them (see `mono_thread_manage`).
2017-02-07 15:13:12 -05:00
Marek Safar 42a5eeb95a Bump cecil 2017-02-07 17:53:26 +01:00
Marek Safar b65e5ee577 [corlib] Update TimeZoneTest ios simulator check 2017-02-07 10:23:02 +01:00
Vlad Brezae 672282c892 [sgen] Don't assert when suspending detaching thread (#4292)
This means that the thread will be part of the stw (not skipped), so if the stack pointer is not between the expected ranges we dont scan the thread. In other parts of the runtime, suspending here is handled by the suspend_can_continue flag.
2017-02-06 21:25:22 +02:00
1613 changed files with 30575 additions and 30913 deletions

No files matched your search

+1 -3
View File
@@ -7,6 +7,7 @@
[submodule "external/cecil"]
path = external/cecil
url = git://github.com/mono/cecil.git
branch = mono-2017-02
[submodule "external/rx"]
path = external/rx
url = git://github.com/mono/rx.git
@@ -55,6 +56,3 @@
[submodule "external/corert"]
path = external/corert
url = git://github.com/mono/corert.git
[submodule "external/xunit-binaries"]
path = external/xunit-binaries
url = git://github.com/mono/xunit-binaries.git
+6 -10
View File
@@ -44,10 +44,9 @@ dist-hook:
rm -rf `find $(top_distdir)/external -path '*\.git'`
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
# Disable this for now because it is very slow and causes wrench to timeout:
# test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
mac-sdk-package:
external/bockbuild/bb MacSDK --package
pkgconfigdir = $(libdir)/pkgconfig
noinst_DATA = mono-uninstalled.pc
@@ -55,16 +54,13 @@ DISTCLEANFILES= mono-uninstalled.pc
# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
monolite_url = https://download.mono-project.com/monolite/monolite-$(MONO_CORLIB_VERSION)-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
-mkdir -p $(mcslib)
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
-rm -fr $(mcslib)/monolite/$(MONO_CORLIB_VERSION)
-mkdir -p $(mcslib)/monolite
cd $(mcslib) && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
cd $(mcslib) && mv -f monolite-* monolite
cd $(mcslib) && mv -f monolite-* monolite/$(MONO_CORLIB_VERSION)
if BITCODE
BITCODE_CHECK=yes
+2 -5
View File
@@ -29,7 +29,6 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
| Windows | amd64 | [![windows-amd64][15]][16] |
| Windows | i386 | [![windows-amd64][17]][18] |
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
_(cs) = community supported architecture_
@@ -51,10 +50,8 @@ _(cs) = community supported architecture_
[16]: https://jenkins.mono-project.com/job/z/label=w64/
[17]: https://jenkins.mono-project.com/job/z/label=w32/badge/icon
[18]: https://jenkins.mono-project.com/job/z/label=w32/
[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
[19]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
[20]: https://jenkins.mono-project.com/job/z/label=centos-s390x
Compilation and Installation
============================
+1 -1
View File
@@ -18,7 +18,7 @@
{
"name": "ms-test-suite",
"url": "[email protected]:xamarin/ms-test-suite.git",
"rev": "73c155f76b55839f26ba707d6d40091060e4f5d8",
"rev": "55b6637eb1de61c743323ec82db1e0cadfee5b32",
"remote-branch": "origin/master",
"branch": "master",
"directory": "ms-test-suite"
+32 -61
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.1.0],
AC_INIT(mono, [5.0.1],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
# This can be reset to 0 when Mono's version number is bumped
# since it's part of the corlib version (the prefix '1' in the full
# version number is to ensure the number isn't treated as octal in C)
MONO_CORLIB_COUNTER=1
MONO_CORLIB_COUNTER=0
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR $MONO_VERSION_BUILD $MONO_CORLIB_COUNTER`
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
@@ -233,6 +233,9 @@ case "$host" in
CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
# The configure check can't detect this
AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
# to bypass the underscore linker check, can't work when cross-compiling
mono_cv_uscore=yes
mono_cv_clang=no
@@ -348,13 +351,9 @@ case "$host" in
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_THREAD_SAFE"
libmono_cflags="-D_REENTRANT -D_THREAD_SAFE"
libdl=
LIBS="$LIBS -lnetwork -ltextencoding"
LIBS="$LIBS -lnetwork"
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
dnl Haiku does not support static TLS with __thread
with_tls=pthread
dnl Boehm is too much work to backport Haiku support for
support_boehm=no
libgc_threads=pthreads
use_sigposix=yes
;;
@@ -876,9 +875,9 @@ elif test x$with_runtime_preset = xfullaot; then
mono_feature_disable_reflection_emit='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_BUILD_FLAGS="-O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
AOT_RUN_FLAGS="--full-aot"
elif test x$with_runtime_preset = xbitcode; then
DISABLE_MCS_DOCS_default=yes
with_testing_aot_full_default=yes
@@ -893,15 +892,19 @@ elif test x$with_runtime_preset = xbitcode; then
mono_feature_disable_reflection_emit='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile --aot=llvmonly,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --llvmonly"
AOT_BUILD_FLAGS="--aot=llvmonly,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--llvmonly"
elif test x$with_runtime_preset = xhybridaot; then
DISABLE_MCS_DOCS_default=yes
with_testing_aot_hybrid_default=yes
TEST_PROFILE=testing_aot_hybrid
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
mono_feature_disable_com='yes'
mono_feature_disable_remoting='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--aot=hybrid,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--hybrid-aot"
elif test x$with_runtime_preset = xaot; then
with_profile4_x_default=yes
@@ -920,8 +923,8 @@ elif test x$with_runtime_preset = xwinaot; then
mono_feature_disable_reflection_emit='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
AOT_BUILD_FLAGS="--aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--full-aot"
elif test x$with_runtime_preset = xorbis; then
DISABLE_MCS_DOCS_default=yes
with_orbis_default=yes
@@ -933,8 +936,8 @@ elif test x$with_runtime_preset = xorbis; then
mono_feature_disable_reflection_emit='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
AOT_BUILD_FLAGS="--aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--full-aot"
else
with_profile4_x_default=yes
fi
@@ -1446,6 +1449,8 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(getgrgid_r)
AC_CHECK_FUNCS(getgrnam_r)
AC_CHECK_FUNCS(getpwnam_r)
AC_CHECK_FUNCS(getpwuid_r)
AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(setresuid)
AC_CHECK_FUNCS(kqueue)
@@ -1466,11 +1471,6 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
if test x$platform_android != xyes; then
AC_CHECK_FUNCS(getpwnam_r)
AC_CHECK_FUNCS(getpwuid_r)
fi
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
dnl *** 2.3.4. The older versions of the function only take 2 ***
@@ -1931,10 +1931,6 @@ if test x$host_win32 = xno; then
# and libpthread does not exist
#
case "${host}" in
*-*-*haiku*)
dnl Haiku has pthread in libroot (libc equiv)
AC_CHECK_LIB(pthread, main, LIBS="$LIBS")
;;
*-*-*freebsd*)
AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
;;
@@ -2344,10 +2340,6 @@ if test x$host_win32 = xno; then
AC_MSG_RESULT(no)
])
dnl **********************************
dnl *** Checks for proclib ***
dnl **********************************
AC_CHECK_HEADER(sys/errno.h, [AC_DEFINE(HAVE_SYS_ERRNO_H, 1, Define to 1 if you have the <sys/errno.h> header file.)])
dnl **********************************
dnl *** Checks for MonoPosixHelper ***
dnl **********************************
@@ -3339,6 +3331,7 @@ if test "x$host" != "x$target"; then
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
ACCESS_UNALIGNED="no"
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
# Can't use tls, since it depends on the runtime detection of tls offsets
@@ -3351,11 +3344,6 @@ if test "x$host" != "x$target"; then
CPPFLAGS="$CPPFLAGS"
;;
armv5-*-linux-androideabi*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
;;
*-linux-androideabi*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
;;
esac
@@ -3375,33 +3363,23 @@ if test "x$host" != "x$target"; then
TARGET=X86;
arch_target=x86;
AC_DEFINE(TARGET_X86, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
target_mach=no
case "$target" in
*-linux-android*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
;;
esac
;;
x86_64*-linux-*)
TARGET=AMD64;
arch_target=amd64;
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
target_mach=no
case "$target" in
*-linux-android*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
;;
esac
;;
x86_64-ps4-freebsd)
TARGET=AMD64;
@@ -3420,16 +3398,12 @@ if test "x$host" != "x$target"; then
TARGET=ARM64;
arch_target=arm64;
AC_DEFINE(TARGET_ARM64, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
target_mach=no
case "$target" in
*-linux-android*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
;;
esac
;;
aarch64-*)
TARGET=ARM64
@@ -3623,13 +3597,13 @@ if test "x$have_deprecated" = "xyes"; then
AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
fi
AC_ARG_ENABLE(interpreter, [ --enable-interpreter Enable Interpreter], enable_interpreter=$enableval, enable_interpreter=no)
if test "x$enable_interpreter" = "xyes"; then
AC_DEFINE(ENABLE_INTERPRETER, 1, [Enable Interpreter])
AC_ARG_WITH(interpreter, [ --with-interpreter=yes|no Interpreter, default=no],[buildinterpreter=$with_interpreter],[buildinterpreter=no])
if test "x$buildinterpreter" = "xyes"; then
AC_DEFINE(ENABLE_INTERPRETER, 1, [Enable interpreter in the runtime.])
AC_MSG_NOTICE([Enable interpreter in the runtime.])
fi
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
AM_CONDITIONAL([ENABLE_INTERPRETER], [test x$buildinterpreter != xno])
dnl
@@ -4149,8 +4123,6 @@ if test "x$enable_btls" = "xyes"; then
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$BTLS_ROOT/util/android-cmake/android.toolchain.cmake"
if test "x$with_btls_android_ndk" != "x"; then
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DANDROID_NDK=\"$with_btls_android_ndk\""
else
AC_MSG_ERROR([Need to pass the --with-btls-android-ndk argument when building with BTLS support on Android.])
fi
fi
@@ -4439,7 +4411,6 @@ mono/tests/Makefile
mono/tests/tests-config
mono/tests/assemblyresolve/Makefile
mono/tests/gc-descriptors/Makefile
mono/tests/testing_gac/Makefile
mono/unit-tests/Makefile
mono/benchmark/Makefile
mono/mini/Makefile
@@ -4629,7 +4600,7 @@ echo "
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Interpreter: $enable_interpreter
Interpreter: $buildinterpreter
Libraries:
.NET 4.x: $with_profile4_x
-6
View File
@@ -18,14 +18,8 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<dllmap dll="libX11" target="@X11@" os="!windows" />
<dllmap dll="libgdk-x11-2.0" target="@GDKX11@" os="!windows"/>
<dllmap dll="libgdk_pixbuf-2.0" target="libgdk_pixbuf-2.0.so.0" os="!windows"/>
<dllmap dll="libgtk-x11-2.0" target="@GTKX11@" os="!windows"/>
<dllmap dll="libglib-2.0" target="libglib-2.0.so.0" os="!windows"/>
<dllmap dll="libgobject-2.0" target="libgobject-2.0.so.0" os="!windows"/>
<dllmap dll="libgnomeui-2" target="libgnomeui-2.so.0" os="!windows"/>
<dllmap dll="librsvg-2" target="librsvg-2.so.2" os="!windows"/>
<dllmap dll="libXinerama" target="@XINERAMA@" os="!windows" />
<dllmap dll="libasound" target="libasound.so.2" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
+4 -27
View File
@@ -9,38 +9,16 @@ def print_frames(thread, num_frames, current_thread):
for frame in thread.frames[:+num_frames]:
pc = str(frame.addr)
fmt = ' %c %s'
var = frame
function_name = frame.GetFunctionName()
if function_name == "ves_exec_method_with_context":
try:
s = 'frame->runtime_method->method'
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
ipoffset = frame.EvaluateExpression('ip').GetValueAsUnsigned()
insn = ''
if ipoffset != 0:
ipoffset -= frame.EvaluateExpression('rtm->code').GetValueAsUnsigned()
insn = "\"" + frame.EvaluateExpression('mono_interp_opname [*ip]').summary[1:-1] + "\""
var = '%s::%s @ %d %s || %s' % (klassname, methodname, ipoffset, insn, frame)
except Exception as e:
print "DBG: execfail:" + str(e)
elif function_name == "mono_interp_transform_method":
try:
s = 'runtime_method->method'
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
var = 'transforming %s::%s || %s' % (klassname, methodname, frame)
except Exception as e:
print "DBG: transformfail:" + str(e)
elif pc[0] == '0':
if pc[0] == '0':
try:
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
except:
pass
print ' %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
def monobt(debugger, command, result, dict):
opts = {'all_bt': False, 'num_frames': None}
@@ -75,5 +53,4 @@ def __lldb_init_module (debugger, dict):
# This initializer is being run from LLDB in the embedded command interpreter
# Add any commands contained in this module to LLDB
debugger.HandleCommand('command script add -f monobt.monobt monobt')
debugger.HandleCommand('command alias mbt monobt')
print '"monobt" command installed'
print '"monobt" command installed'
+2 -2
View File
@@ -86,7 +86,7 @@ LOCK RULES
Simple locks:
Can be acquired at any point regardless of which locks are taken or not.
No other locks can be acquired or released while holding a simple lock.
Reentrancy is not recommended. (warning)
Reentrancy is not recomended. (warning)
Simple locks are leaf locks on the lock lattice.
Complex locks:
@@ -129,7 +129,7 @@ ERROR: tried to acquire lock DomainLock at mono_domain_code_reserve_align while
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_class_from_name
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_image_add_to_name_cache
Both of those happen when filling up the name_cache, as it needs to alloc image memory.
This one is fixable by splitting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriately.
This one is fixable by spliting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriatedly.
*/
+1 -1
View File
@@ -87,7 +87,7 @@ mono-file-formats.zip: mono-file-formats.tree
mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp
$(TOOL_MAKE) $@
deploy/.stamp: convert.exe Makefile.am exdoc
deploy/.stamp: convert.exe Makefile.am
$(mkdir_p) html
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
+4 -4
View File
@@ -26,7 +26,7 @@ some combination of the two.
To be clearer, and give an idea of what the algorithm can and
cannot do without describing it in detail... keep in mind that
only "redundant" checks cannot be removed. By "redundant", I
only "redunant" checks cannot be removed. By "redundant", I
mean "already explicitly checked" in the method code.
Unfortunately, analyzing complex expressions is not so easy
@@ -136,7 +136,7 @@ some combination of the two.
In the first case, the BB has exactly two exit BBs, and their
execution conditions are easy to get from the condition of the
branch (see the "get_relation_from_branch_instruction"
function, and especially the end of "analyze_block" in
function, and expecially the end of "analyze_block" in
abcremoval.c.
If there is a switch, the jump condition of every exit BB is
@@ -303,7 +303,7 @@ some combination of the two.
each BB tried to examine all possible conditions between all
variables, filling a sort of "evaluation matrix". The problem
was that the complexity of this evaluation was quadratic (or
worse) on the number of variables, and that many variables
worse) on the number of variables, and that many wariables
were examined even if they were not involved in any array
access.
@@ -332,7 +332,7 @@ some combination of the two.
[1b] Prepare the evaluation graph (empty)
[1b] Summarize each variable definition, and put
[1b] Summarize each varible definition, and put
the resulting relations in the evaluation
graph
+4 -6
View File
@@ -19,7 +19,7 @@ ENUM_VALUES_PER_LINE = 1
EXCLUDE_SYMLINKS = NO
EXPAND_ONLY_PREDEF = NO
EXTENSION_MAPPING = c=C h=C
EXTRACT_ALL = NO
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
EXT_LINKS_IN_WINDOW = NO
FILE_PATTERNS = *.c *.h
@@ -27,9 +27,9 @@ FULL_PATH_NAMES = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST = YES
GENERATE_HTML = YES
GENERATE_PERLMOD = YES
GENERATE_LEGEND = YES
GENERATE_PERLMOD = NO
GENERATE_TESTLIST = NO
GENERATE_TESTLIST = YES
GENERATE_TODOLIST = YES
GENERATE_TREEVIEW = YES
GRAPHICAL_HIERARCHY = YES
@@ -60,7 +60,6 @@ MULTILINE_CPP_IS_BRIEF = NO
OPTIMIZE_OUTPUT_FOR_C = YES
OUTPUT_DIRECTORY = doxygen-output
OUTPUT_LANGUAGE = English
PREDEFINED = "HAVE_SGEN_GC="
PROJECT_NAME = "Mono"
QT_AUTOBRIEF = NO
QUIET = NO
@@ -78,7 +77,6 @@ SHOW_USED_FILES = YES
SKIP_FUNCTION_MACROS = YES
SORT_BRIEF_DOCS = YES
SORT_GROUP_NAMES = YES
SORT_MEMBER_DOCS = YES
SOURCE_BROWSER = YES
SOURCE_TOOLTIPS = YES
STRIP_CODE_COMMENTS = NO
@@ -91,4 +89,4 @@ VERBATIM_HEADERS = YES
WARNINGS = YES
WARN_IF_DOC_ERROR = YES
WARN_IF_UNDOCUMENTED = YES
WARN_NO_PARAMDOC = YES
WARN_NO_PARAMDOC = NO
+259 -436
View File
@@ -1,295 +1,91 @@
#!/usr/bin/perl
use warnings;
use strict;
use Getopt::Long;
use Pod::Usage;
# Options
my $HELP = 0;
my $SOURCE_DIR = '';
my $TARGET_DIR = '';
my $WARNINGS = 0;
GetOptions(
"help" => \$HELP,
"html|h=s" => \$SOURCE_DIR,
"target|t=s" => \$TARGET_DIR,
"warnings|W" => \$WARNINGS,
) or pod2usage(1);
pod2usage(0) if $HELP;
exdoc();
#
# Main entry point.
#
sub exdoc {
my %templates = ();
my %docs = ();
my $stylesheet = load_stylesheet($SOURCE_DIR);
load_templates($SOURCE_DIR, \%templates);
process_source_files(\%docs);
merge(\%docs, \%templates, \$stylesheet);
if ($ARGV[0] eq "-h"){
$sourcedir = $ARGV[1];
$dir = $sourcedir;
$html = 1;
shift @ARGV;
shift @ARGV;
}
open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
while (<FILE>){
$css = $css . $_;
}
#
# Load CSS stylesheet.
#
sub load_stylesheet {
my ($dir_path) = @_;
my $file_path = "$dir_path/api-style.css";
open (my $file, '<', $file_path) or die "Could not open $file_path";
local $/;
my $contents = <$file>;
close $file;
return $contents;
if ($ARGV[0] eq "-t"){
$dir = $ARGV[1];
shift @ARGV;
}
#
# Load HTML templates.
#
sub load_templates {
my ($dir_path, $templates) = @_;
opendir (my $dir, "$dir_path/sources/") or die "Could not open $dir_path";
while (my $file_name = readdir ($dir)) {
next if $file_name !~ /mono-api-.*\.html$/;
open (my $file, "$dir_path/sources/$file_name") or die "Could not open $file_name";
my $contents = '';
my @api = ();
while (<$file>) {
$contents .= $_;
if (/name="api:(.*?)"/) {
s/.*name="api:(\w+?)".*/$1/;
push @api, $_;
}
}
close $file;
$templates->{$file_name}->{contents} = $contents;
$templates->{$file_name}->{api} = \@api;
}
closedir $dir;
}
#
# Extract documentation from all source files.
#
sub process_source_files {
my ($docs) = @_;
for my $file_path (@ARGV) {
process_source_file($file_path, $docs);
if ($html){
opendir (D, "$sourcedir/sources/") || die "Can not open $dir";
while ($n = readdir (D)){
if ($n =~ /mono-api-.*\.html$/){
open (IN, "$sourcedir/sources/$n") || die "Can not open $n";
$files[$filecount] = $n;
while (<IN>){
@files_content[$filecount] .= $_;
if (/name="api:(.*?)"/){
$_ =~ s/.*name="api:(\w+?)".*/\1/;
$apis[$filecount] .= "$_";
}
}
$filecount++;
close IN;
}
}
}
#
# Extract documentation from a single source file.
#
sub process_source_file {
my ($file_path, $docs) = @_;
open (my $file, '<', $file_path) or die "Could not open $file_path";
while (<$file>) {
next if (!/\/\*\* *\n/);
process_function($file, $file_path, $docs);
}
close $file;
while (<ARGV>){
if (/\/\*\* *\n/){
&process_doc;
} else {
#print "IGNORING: $_";
}
}
#
# Extract documentation from a single function.
#
sub process_function {
my ($file, $file_path, $docs) = @_;
my $PARAMETER_SECTION = 0;
my $BODY_SECTION = 1;
my $RETURN_SECTION = 2;
my $section = $PARAMETER_SECTION;
my $name = do {
$_ = <$file>;
chomp;
s/^ \* //;
s/:$//;
$_
};
# Ignore irrelevant functions, and those with the wrong doc format.
return if $name !~ /^mono_\w+$/;
my $deprecated;
my @parameters = ();
my $body = '';
my $returns = '';
my $prototype = '';
while (<$file>) {
# We've reached the last line in the documentation block.
if (/^ \*\*?\//) {
# Grab function prototype.
while (<$file>) {
$prototype .= $_;
last if /\{/;
}
# Clean up prototype.
$prototype = do {
$_ = $prototype;
# Strip braces and trailing whitespace.
s/{//;
s/ +$//;
# Turn "Type * xxx" into "Type* xxx"
s/^(\w+)\W+\*/$1*/;
$_;
};
# Process formatting within sections.
for my $parameter (@parameters) {
process_formatting(\$parameter->{description}, $file_path, $.);
}
process_formatting(\$returns, $file_path, $.);
process_formatting(\$body, $file_path, $.);
if (defined($deprecated)) {
process_formatting(\$deprecated, $file_path, $.);
}
$body =~ s/\n/ /g;
if (exists($docs->{body}->{$name})) {
my $origin = $docs->{origin}->{$name};
if ($WARNINGS) {
warn
"$file_path:$.: Redundant documentation for $name\n",
"$origin->{file}:$origin->{line}: Previously defined here\n";
}
}
$docs->{origin}->{$name} = { file => $file_path, line => $. };
$docs->{body}->{$name} = $body;
$docs->{parameters}->{$name} = \@parameters;
$docs->{deprecated}->{$name} = $deprecated if defined $deprecated;
$docs->{return}->{$name} = $returns;
$docs->{prototype}->{$name} = $prototype;
last;
}
# Strip newlines and asterisk prefix.
chomp;
s/^ +\*//;
# Replace blank lines with paragraph breaks.
$_ = '<p>' if /^\s*$/;
if ($section == $PARAMETER_SECTION) {
if (/\s*\\param +(\w+)(.*)/) {
# print "$file_path:$.: warning: Got parameter $1\n";
push @parameters, { name => $1, description => $2 };
} elsif (/\s*\\deprecated(.*)/) {
# print "$file_path:$.: warning: Got deprecated annotation\n";
$deprecated = $1;
} elsif (/\s*(\w+):(.*)/) {
if ($1 eq 'deprecated') {
warn "$file_path:$.: Old-style monodoc notation 'deprecated:' used\n"
if $WARNINGS;
$deprecated = $2;
} else {
warn "$file_path:$.: Old-style monodoc notation 'param:' used\n"
if $WARNINGS;
push @parameters, { name => $1, description => $2 };
}
} else {
# $body = "\t$_\n";
$section = $BODY_SECTION;
redo;
}
} elsif ($section == $BODY_SECTION) {
if (s/(Returns?:\s*|\\returns?\s*)//) {
$returns = "\t$_\n";
$section = $RETURN_SECTION;
} else {
$body .= "\n\t$_";
}
} elsif ($section == $RETURN_SECTION) {
$returns .= "\n\t$_";
} else {
die "Invalid section $section\n";
}
}
}
#
# Substitute formatting within documentation text.
#
sub process_formatting {
my ($content, $file_path, $current_line) = @_;
$_ = $$content;
# Constants
s{NULL}{<code>NULL</code>}g;
s{TRUE}{<code>TRUE</code>}g;
s{FALSE}{<code>FALSE</code>}g;
# Parameters
warn "$file_path:$current_line: Old-style monodoc notation '\@param' used\n"
if s{@(\w+)}{<i>$1</i>}g && $WARNINGS;
s{\\p +(\w+)}{<i>$1</i>}g;
# Code
warn "$file_path:$current_line: Old-style monodoc notation '#code' used\n"
if s{#(\w+)}{<code>$1</code>}g && $WARNINGS;
warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n"
if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS;
s{\\c +(\S+(?<![.,:;]))}{<code>$1</code>}g;
$$content = $_;
}
#
# Merge templates with stylesheet and documentation extracted from sources.
#
sub merge {
my ($docs, $templates, $stylesheet) = @_;
my $last = '';
for my $name (keys %$templates) {
open (my $output_file, '>', "$TARGET_DIR/html/$name")
or die "Could not create $TARGET_DIR/html/$name";
print "Merging: $name\n";
print $output_file <<EOF;
if ($html){
for ($f = 0; $f < $filecount; $f++){
$name = $files[$f];
open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name";
print "Merging: $name\n";
print OUT<<EOF;
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$name</title>
<style type="text/css">
$stylesheet
$css
</style>
</head>
<body>
<div class="mapi-docs">
EOF
my @a = split (/\n/, $templates->{$name}->{contents});
my $strike = '';
my $strikeextra = '';
my $api_shown = 0;
for (my $ai = 0; $ai < $#a; $ai++) {
my $line = $a[$ai];
if (my ($api, $caption) = ($line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/)) {
if ($api_shown == 1) {
print $output_file "</div> <!-- class=mapi -->\n\n";
if ($docs->{deprecated}->{$api}) {
$strike = "mapi-strike";
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $docs->{deprecated}->{$api};
} else {
$strike = "";
$strikeextra = "";
}
}
$api_shown = 1;
my $proto = $docs->{prototype}->{$api} // $api;
@a = split (/\n/, $files_content[$f]);
$strikeextra = "";
$api_shown = 0;
for ($ai = 0; $ai < $#a; $ai++){
$line = $a[$ai];
($api,$caption) = $line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
if ($api ne ""){
if ($api_shown == 1){
print OUT "</div> <!-- class=mapi -->\n\n";
if ($deprecated{$api}){
$strike = "mapi-strike";
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
} else {
$strike = "";
$strikeextra = "";
}
}
$api_shown = 1;
$proto = $prototype{$api};
if ($proto eq ""){
$proto = "$api";
}
print $output_file <<EOF;
print OUT<<EOF;
<a name="api:$api"></a>
<div class="mapi">
<div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
@@ -302,201 +98,228 @@ EOF
<div class="mapi-prototype">$proto</div>
<p>
EOF
if (exists ($docs->{parameters}->{$api})) {
my $ppars = $docs->{parameters}->{$api};
if (@$ppars) {
print $output_file
" <div class=\"mapi-section\">Parameters</div>\n",
" <table class=\"mapi-parameters\"><tbody>",
render_parameters($ppars),
"</tbody></table>";
}
}
$ppars = $arguments{$api};
if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
print OUT " <div class=\"mapi-section\">Parameters</div>\n";
print OUT " <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
}
&opt_print ("Return value", $returns{$api}, 0);
&opt_print ("Description", $bodies{$api}, 0);
print OUT " </div><!--mapi-description-->\n </div><!--height container-->\n";
} else {
if ($line =~ /@API_IDX@/){
$apis_toc = &create_toc ($apis[$f]);
$line =~ s/\@API_IDX\@/$apis_toc/;
}
if ($line =~ /^<h4/){
print OUT "</div>\n";
$api_shown = 0;
}
if ($line =~ /`/){
}
print OUT "$line\n";
}
}
print OUT<<EOF;
</div>
</body>
</html>
EOF
close OUT;
system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
opt_print ($output_file, "Return value", $docs->{return}->{$api});
opt_print ($output_file, "Description", $docs->{body}->{$api});
print $output_file " </div><!--mapi-description-->\n </div><!--height container-->\n";
} else {
if ($line =~ /\@API_IDX\@/) {
my $apis_toc = create_toc ($docs, $templates->{$name}->{api});
$line =~ s/\@API_IDX\@/$apis_toc/;
}
if ($line =~ /^<h4/) {
print $output_file "</div>\n";
$api_shown = 0;
}
if ($line =~ /`/) {
}
print $output_file "$line\n";
}
}
print $output_file
" </div>",
"</body>",
"</html>";
close $output_file;
system ("$ENV{runtimedir}/mono-wrapper convert.exe $TARGET_DIR/html/$name $TARGET_DIR/html/x-$name");
# Clean up the mess that AgilityPack makes (it CDATAs our CSS).
open (my $hack_input, '<', "$TARGET_DIR/html/x-$name")
or die "Could not open $TARGET_DIR/html/x-$name";
open (my $hack_output, '>', "$TARGET_DIR/deploy/$name")
or die "Could not open output";
# clean up the mess that AgilityPack does, it CDATAs our CSS
open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
my $line = 0;
my $doprint = 0;
while (<$hack_input>) {
print $hack_output $last if ($doprint);
$line++;
s/^\/\/<!\[CDATA\[//;
s/^\/\/\]\]>\/\///;
$line = 0;
$doprint = 0;
while (<HACK>){
print HACKOUT $last if ($doprint);
$line++;
s/^\/\/<!\[CDATA\[//;
s/^\/\/\]\]>\/\///;
# Remove the junk <span> wrapper generated by AgilityPack.
if ($line==1) {
s/<span>//;
}
if (/<style type/) {
# Replace the CSS in the XHTML output with the original CSS.
print $hack_output $_;
print $hack_output $$stylesheet;
while (<$hack_input>) {
last if (/<\/style>/);
}
}
$last = $_;
$doprint = 1;
}
if (!($last =~ /span/)) {
print $hack_output $last;
}
# system ("cp.exe $TARGET_DIR/html/$name $TARGET_DIR/deploy/$name");
# Remove the junk <span> wrapper generated by AgilityPack
if ($line==1){
s/<span>//;
}
if (/<style type/){
# Replace the CSS in the XHTML output with the original CSS
print HACKOUT $_;
print HACKOUT $css;
while (<HACK>){
last if (/<\/style>/);
}
}
$last = $_;
$doprint = 1;
}
if (!($last =~ /span/)){
print HACKOUT $last;
}
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
}
}
sub process_doc {
$doc = "";
$func = <>;
chop $func;
$func =~ s/^ \* //;
$func =~ s/:$//;
print "Function: $func\n" if (!$html);
$args = "";
$inbody = 0;
$returns = "";
$body = "";
$functions[$fn++] = $func;
$deprecated = 0;
# Process arguments
while (<>){
s/NULL/<code>NULL<\/code>/g;
s/TRUE/<code>TRUE<\/code>/g;
s/FALSE/<code>FALSE<\/code>/g;
if (/^ \*\*?\//){
$body =~ s/@(\w+)/<i>\1<\/i>/g;
$returns =~ s/@(\w+)/<i>\1<\/i>/g;
$args =~ s/@(\w+)/<i>\1<\/i>/g;
$body =~ s/#(\w+)/<code>\1<\/code>/g;
$returns =~ s/#(\w+)/<code>\1<\/code>/g;
$args =~ s/#(\w+)/<code>\1<\/code>/g;
$returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
$body =~ s/\n/ /;
$bodies{$func} = $body;
$arguments{$func} = $args;
$deprecated{$func} = $deprecated;
$returns{$func} = $returns;
$proto = "";
while (<>){
$proto .= $_;
last if (/\{/);
}
$proto =~ s/{//;
# clean it up a little, remove newlines, empty space at end
$proto =~ s/ +$//;
# Turn "Type * xxx" into "Type* xxx"
$proto =~ s/^(\w+)\W+\*/\1\*/;
$prototype{$func} = $proto;
return;
}
chop;
s/^\ \*//;
$_ = "<p>" if (/^\s*$/);
if ($inbody == 0){
if (/\s*(\w+):(.*)/){
if ($1 eq "deprecated"){
$deprecated = $2;
} else {
#$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
$args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
}
} else {
$body = "\t$_\n";
$inbody = 1;
}
} elsif ($inbody == 1) {
if (/Returns?:/){
s/Returns?://;
$returns = "\t$_\n";
$inbody = 2;
} else {
$body .= "\n\t$_";
}
} else {
$returns .= "\n\t$_";
}
}
}
sub create_toc {
my ($docs, $apis_listed) = @_;
my ($apis_listed) = @_;
my $type_size = 0;
my $name_size = 0;
my ($ret, $xname, $args);
my $apis_toc = "";
my $ret, $xname, $args, $line;
$apis_toc = "";
# Try to align things; compute type size, method size, and arguments.
foreach my $line (split /\n/, $apis_listed) {
if (exists ($docs->{prototype}->{$line})) {
my $p = $docs->{prototype}->{$line};
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
my $tl = length ($ret);
my $pl = length ($xname);
$type_size = $tl if ($tl > $type_size);
$name_size = $pl if ($pl > $name_size);
}
}
# Try to align things, so compute type size, method size, and arguments
foreach $line (split /\n/, $apis_listed){
$p = $prototype{$line};
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
$tl = length ($ret);
$pl = length ($xname);
$type_size = $tl if ($tl > $type_size);
$name_size = $pl if ($pl > $name_size);
}
$type_size++;
$name_size++;
foreach my $line (split /\n/, $apis_listed) {
chomp($line);
if (exists($docs->{prototype}->{$line})) {
my $p = $docs->{prototype}->{$line};
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
$xname = $line if $xname eq "";
my $rspace = " " x ($type_size - length ($ret));
my $nspace = " " x ($name_size - length ($xname));
$args = wrap ($args, length ($ret . $rspace . $xname . $nspace), 60);
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
}
}
foreach $line (split /\n/, $apis_listed){
chop;
$p = $prototype{$line};
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
if ($xname eq ""){
$xname = $line;
}
$rspace = " " x ($type_size - length ($ret));
$nspace = " " x ($name_size - length ($xname));
$args = &format ($args, length ($ret . $rspace . $xname . $nspace), 60);
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
}
return $apis_toc;
}
sub wrap {
#
# Formats the rest of the arguments in a way that will fit in N columns
#
sub format {
my ($args, $size, $limit) = @_;
my $sret = "";
# return $args if ((length (args) + size) < $limit);
# return $args if ((length (args) + size) < $limit);
my $remain = $limit - $size;
my @sa = split /,/, $args;
my $linelen = $size;
foreach my $arg (@sa) {
if ($sret eq "") {
$sret = $arg . ", ";
$linelen += length ($sret);
} else {
if ($linelen + length ($arg) < $limit) {
$sret .= "FITS" . $arg . ", ";
} else {
my $newline = " " x ($size) . $arg . ", ";
my $linelen = length ($newline);
$sret .= "\n" . $newline;
}
}
$remain = $limit - $size;
@sa = split /,/, $args;
$linelen = $size;
foreach $arg (@sa){
if ($sret eq ""){
$sret = $arg . ", ";
$linelen += length ($sret);
} else {
if ($linelen + length ($arg) < $limit){
$sret .= "FITS" . $arg . ", ";
} else {
$newline = " " x ($size) . $arg . ", ";
$linelen = length ($newline);
$sret .= "\n" . $newline;
}
}
}
$sret =~ s/, $/;/;
return $sret;
}
#
# Print a section if non-empty.
#
sub opt_print {
my ($output, $caption, $opttext) = @_;
if (defined($opttext) && $opttext ne '' && $opttext !~ /^[ \t]+$/) {
print $output
" <div class=\"mapi-section\">$caption</div>\n",
" <div>$opttext</div>\n";
my ($caption, $opttext, $quote) = @_;
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
print OUT " <div class=\"mapi-section\">$caption</div>\n";
print OUT " <div>$opttext</div>\n";
}
}
#
# Render parameter information as table.
#
sub render_parameters {
my ($parameters) = @_;
my $result = '';
for my $parameter (@$parameters) {
$result .= "<tr><td><i>$parameter->{name}</i></td><td>$parameter->{description}</td></tr>";
}
return $result;
}
__END__
=head1 NAME
exdoc - Compiles API docs from Mono sources and HTML templates.
=head1 SYNOPSIS
exdoc [OPTIONS] [FILE...]
=head1 OPTIONS
=over 4
=item B<--help>
Print this help message.
=item B<--html> I<DIR>, B<-h> I<DIR>
Use I<DIR> as the input path for HTML sources.
=item B<--target> I<DIR>, B<-t> I<DIR>
Use I<DIR> as the target path for output.
=item B<--warnings>, B<-W>
Enable warnings about documentation errors.
=back
=head1 DESCRIPTION
Reads HTML templates and C sources, extracting documentation from the sources and splicing it into the templates.
=cut
+1
View File
@@ -27,6 +27,7 @@ typedef enum {
<h3>Opening and closing MonoImages</h3>
<h4><a name="api:mono_load_image">mono_load_image</a></h4>
<h4><a name="api:mono_image_open">mono_image_open</a></h4>
<h4><a name="api:mono_image_open_full">mono_image_open_full</a></h4>
<h4><a name="api:mono_image_open_from_data">mono_image_open_from_data</a></h4>
+44
View File
@@ -40,6 +40,7 @@
<h4><a name="api:mono_marshal_get_delegate_invoke">mono_marshal_get_delegate_invoke</a></h4>
<h4><a name="api:mono_marshal_get_icall_wrapper">mono_marshal_get_icall_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_isinst">mono_marshal_get_isinst</a></h4>
<h4><a name="api:mono_marshal_get_ldfld_remote_wrapper">mono_marshal_get_ldfld_remote_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_ldfld_wrapper">mono_marshal_get_ldfld_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_managed_wrapper">mono_marshal_get_managed_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_native_wrapper">mono_marshal_get_native_wrapper</a></h4>
@@ -50,6 +51,7 @@
<h4><a name="api:mono_marshal_get_remoting_invoke_with_check">mono_marshal_get_remoting_invoke_with_check</a></h4>
<h4><a name="api:mono_marshal_get_runtime_invoke">mono_marshal_get_runtime_invoke</a></h4>
<h4><a name="api:mono_marshal_get_stelemref">mono_marshal_get_stelemref</a></h4>
<h4><a name="api:mono_marshal_get_stfld_remote_wrapper">mono_marshal_get_stfld_remote_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_stfld_wrapper">mono_marshal_get_stfld_wrapper</a></h4>
<h4><a name="api:mono_marshal_get_struct_to_ptr">mono_marshal_get_struct_to_ptr</a></h4>
<h4><a name="api:mono_marshal_get_synchronized_wrapper">mono_marshal_get_synchronized_wrapper</a></h4>
@@ -57,9 +59,47 @@
<h4><a name="api:mono_marshal_get_xappdomain_invoke">mono_marshal_get_xappdomain_invoke</a></h4>
<h4><a name="api:mono_marshal_load_type_info">mono_marshal_load_type_info</a></h4>
<h4><a name="api:mono_marshal_method_from_wrapper">mono_marshal_method_from_wrapper</a></h4>
<h4><a name="api:mono_marshal_realloc">mono_marshal_realloc</a></h4>
<h4><a name="api:mono_marshal_set_last_error">mono_marshal_set_last_error</a></h4>
<h4><a name="api:mono_marshal_type_size">mono_marshal_type_size</a></h4>
<h2>Metadata Loading Errors</h2>
<p>The routines in this section are used to cope with errors
during metadata loading. Errors in metadata handling can
happen for many reason, and these include (this is not an
exhaustive list).
<ul>
<li>An assembly referenced is missing.
<li>Fields referenced are missing.
<li>Methods referenced are missing.
</ul>
<p>The <tt>mono_loader_set_*</tt> routines are invoked during
metadata loading to flag that an error has happened. The
class loading errros are flagged in a per-thread basis.
<P>In various spots in the runtime the
<tt>mono_loader_get_last_error</tt> routine is called to check
if there was a problem, and then errors are propagated upwards
on the stack until we reach a point where an exception can be
raised and no runtime locks are held.
<p>The <tt>mono_loader_error_prepare_exception</tt> takes a
<tt>MonoLoaderError</tt> structure (the value returned from
<tt>mono_loader_get_last_error</tt>), turns that into an
exception and clears the error condition from the current
thread.
<h4><a name="api:mono_loader_set_error_field_load">mono_loader_set_error_field_load</a></h4>
<h4><a name="api:mono_loader_set_error_method_load">mono_loader_set_error_method_load</a></h4>
<h4><a name="api:mono_loader_set_error_type_load">mono_loader_set_error_type_load</a></h4>
<h4><a name="api:mono_loader_get_last_error">mono_loader_get_last_error</a></h4>
<h4><a name="api:mono_loader_clear_error">mono_loader_clear_error</a></h4>
<h4><a name="api:mono_loader_error_prepare_exception">mono_loader_error_prepare_exception</a></h4>
<h2>Metadata Loader Locking: Internals</h2>
<p>The locking functions here are used by code in class.c and
@@ -74,6 +114,10 @@
<p>The internal interface of the Mono GC is the interface used
between the runtime engine and the garbage collector.
<h4><a name="api:mono_gc_disable">mono_gc_disable</a></h4>
<h4><a name="api:mono_gc_enable">mono_gc_enable</a></h4>
<h4><a name="api:mono_gc_start_world">mono_gc_start_world</a></h4>
<h4><a name="api:mono_gc_stop_world">mono_gc_stop_world</a></h4>
<h4><a name="api:mono_gc_alloc_fixed">mono_gc_alloc_fixed</a></h4>
<h4><a name="api:mono_gc_free_fixed">mono_gc_free_fixed</a></h4>
<h4><a name="api:mono_gc_make_descr_from_bitmap">mono_gc_make_descr_from_bitmap</a></h4>
+8
View File
@@ -31,12 +31,17 @@
<h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
<h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
<h4><a name="api:mono_g_hash_table_foreach_steal">mono_g_hash_table_foreach_steal</a></h4>
<h4><a name="api:mono_g_hash_table_insert">mono_g_hash_table_insert</a></h4>
<h4><a name="api:mono_g_hash_table_lookup">mono_g_hash_table_lookup</a></h4>
<h4><a name="api:mono_g_hash_table_lookup_extended">mono_g_hash_table_lookup_extended</a></h4>
<h4><a name="api:mono_g_hash_table_new">mono_g_hash_table_new</a></h4>
<h4><a name="api:mono_g_hash_table_new_full">mono_g_hash_table_new_full</a></h4>
<h4><a name="api:mono_g_hash_table_remap">mono_g_hash_table_remap</a></h4>
<h4><a name="api:mono_g_hash_table_remove">mono_g_hash_table_remove</a></h4>
<h4><a name="api:mono_g_hash_table_replace">mono_g_hash_table_replace</a></h4>
<h4><a name="api:mono_g_hash_table_size">mono_g_hash_table_size</a></h4>
<h4><a name="api:mono_g_hash_table_steal">mono_g_hash_table_steal</a></h4>
<h3>Memory Pools</h3>
@@ -62,6 +67,7 @@
<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
<h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
<h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
<h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
<h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
<h4><a name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4>
@@ -147,4 +153,6 @@
<h4><a name="api:mono_profiler_startup">mono_profiler_startup</a></h4>
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
<h4><a name="api:mono_profiler_stat_hit">mono_profiler_stat_hit</a></h4>
+3
View File
@@ -669,12 +669,15 @@ MONO_TYPESPEC_SIZE
<h4><a name="api:mono_metadata_parse_method_signature">mono_metadata_parse_method_signature</a></h4>
<h4><a name="api:mono_metadata_parse_mh">mono_metadata_parse_mh</a></h4>
<h4><a name="api:mono_metadata_parse_param">mono_metadata_parse_param</a></h4>
<h4><a name="api:mono_metadata_parse_ret_type">mono_metadata_parse_ret_type</a></h4>
<h4><a name="api:mono_metadata_parse_signature">mono_metadata_parse_signature</a></h4>
<h4><a name="api:mono_metadata_parse_typedef_or_ref">mono_metadata_parse_typedef_or_ref</a></h4>
<h4><a name="api:mono_metadata_parse_type">mono_metadata_parse_type</a></h4>
<h2>Generics Support</h2>
<h4><a name="api:mono_metadata_generic_class_equal">mono_metadata_generic_class_equal</a></h4>
<h4><a name="api:mono_metadata_generic_class_hash">mono_metadata_generic_class_hash</a></h4>
<h4><a name="api:mono_metadata_generic_class_is_valuetype">mono_metadata_generic_class_is_valuetype</a></h4>
<h2>Tokens</h2>
-3
View File
@@ -94,9 +94,6 @@ arm*-darwin*|aarch64*-*)
i*86-*-darwin*)
ORDER=G_LITTLE_ENDIAN
;;
*-*-haiku*)
LDFLAGS="$LDFLAGS -ltextencoding"
;;
*-*-openbsd*)
CFLAGS="$CFLAGS -pthread"
LDFLAGS="$LDFLAGS -pthread"
+2 -1
View File
@@ -160,7 +160,8 @@ typedef struct _GMemChunk GMemChunk;
* Misc.
*/
const gchar * g_getenv(const gchar *variable);
gboolean g_hasenv(const gchar *variable);
gchar * g_getenv(const gchar *variable);
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
void g_unsetenv(const gchar *variable);
+50 -4
View File
@@ -39,23 +39,69 @@
#include <unistd.h>
#endif
static pthread_mutex_t env_lock = PTHREAD_MUTEX_INITIALIZER;
const gchar *
g_getenv(const gchar *variable)
/* MONO Comment
*
* As per the UNIX spec,
* "The return value from getenv() may point to static data which may be overwritten by subsequent calls to getenv(), setenv(), or unsetenv()."
* Source: Unix Manual Pages for getenv, IEEE Std 1003.1
*
* This means that using pointers returned from getenv may (and does) lead to many
* pointers which refer to the same piece of memory. When one is freed, all will be freed.
*
* This is unsafe and an ergonomics risk to fix in the callers. While the caller could lock,
* this introduces the risk for looping or exiting while inside of a lock. For this reason,
* g_getenv does not mimic the behavior of POSIX getenv anymore.
*
* The memory address returned will be unique to the invocaton, and must be freed.
* */
gchar *
g_getenv (const gchar *variable)
{
return getenv(variable);
gchar *ret = NULL;
pthread_mutex_lock (&env_lock);
gchar *res = getenv(variable);
if (res)
ret = g_strdup(res);
pthread_mutex_unlock (&env_lock);
return ret;
}
/*
* This function checks if the given variable is non-NULL
* in the environment. It's useful because it removes memory
* freeing requirements.
*
*/
gboolean
g_hasenv (const gchar *variable)
{
pthread_mutex_lock (&env_lock);
gchar *res = getenv(variable);
gboolean not_null = (res != NULL);
pthread_mutex_unlock (&env_lock);
return not_null;
}
gboolean
g_setenv(const gchar *variable, const gchar *value, gboolean overwrite)
{
return setenv(variable, value, overwrite) == 0;
gboolean res;
pthread_mutex_lock (&env_lock);
res = (setenv(variable, value, overwrite) == 0);
pthread_mutex_unlock (&env_lock);
return res;
}
void
g_unsetenv(const gchar *variable)
{
pthread_mutex_lock (&env_lock);
unsetenv(variable);
pthread_mutex_unlock (&env_lock);
}
gchar*
+7 -1
View File
@@ -39,7 +39,13 @@
#include <io.h>
#include <assert.h>
const gchar *
gboolean
g_hasenv (const gchar *variable)
{
return g_getenv (variable) != NULL;
}
gchar *
g_getenv(const gchar *variable)
{
gunichar2 *var, *buffer;
+26 -26
View File
@@ -5,32 +5,6 @@
#include "cygconfig.h"
#else
#ifndef HAVE_WINAPI_FAMILY_SUPPORT
#define HAVE_WINAPI_FAMILY_SUPPORT
/* WIN API Family support */
#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 1
#define HAVE_UWP_WINAPI_SUPPORT 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 1
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
#error Unsupported WINAPI family
#endif
#else
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 0
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
#error Unsupported WINAPI family
#endif
#endif
#endif
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
@@ -104,4 +78,30 @@
#define VERSION "0.1"
#define HAVE_STRTOK_R 1
#ifndef HAVE_WINAPI_FAMILY_SUPPORT
#define HAVE_WINAPI_FAMILY_SUPPORT
/* WIN API Family support */
#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 1
#define HAVE_UWP_WINAPI_SUPPORT 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 1
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
#error Unsupported WINAPI family
#endif
#else
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
#define HAVE_UWP_WINAPI_SUPPORT 0
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
#error Unsupported WINAPI family
#endif
#endif
#endif
#endif
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
View File
@@ -21,7 +21,7 @@
* See the definition of page_hash_table in gc_private.h.
* False hits from the stack(s) are much more dangerous than false hits
* from elsewhere, since the former can pin a large object that spans the
* block, even though it does not start on the dangerous block.
* block, eventhough it does not start on the dangerous block.
*/
/*
+1 -1
View File
@@ -1872,7 +1872,7 @@ Since 6.2alpha6:
- Fixed Makefile.direct for DARWIN. (Thanks to Manuel Serrano.)
- There was a race between GC_pthread_detach and thread exit that could
result in a thread structure being deallocated by GC_pthread_detach
even though it was still needed by the thread exit code. (Thanks to
eventhough it was still needed by the thread exit code. (Thanks to
Dick Porter for the small test case that allowed this to be debugged.)
- Fixed version parsing for non-alpha versions in acinclude.m4 and
version checking in version.h.
+1 -1
View File
@@ -19,7 +19,7 @@ relatively easy to adapt to new compilers with a different set of predefined
macros. Currently these macros generally identify platforms instead of
features. In many cases, this is a mistake.
3) The code currently avoids #elif, even though that would make it more
3) The code currently avoids #elif, eventhough that would make it more
readable. This was done since #elif would need to be understood by ALL
compilers used to build the collector, and that hasn't always been the case.
It makes sense to reconsider this decision at some point, since #elif has been
+1 -1
View File
@@ -936,7 +936,7 @@ void GC_do_local_mark(mse *local_mark_stack, mse *local_top)
/* Try to share the load, since the main stack is empty, */
/* and helper threads are waiting for a refill. */
/* The entries near the bottom of the stack are likely */
/* to require more work. Thus we return those, even though */
/* to require more work. Thus we return those, eventhough */
/* it's harder. */
mse * p;
mse * new_bottom = local_mark_stack
+1 -1
View File
@@ -765,7 +765,7 @@ Refers to a namespace, e.g. \fIN:System\fR.
.I "P:"
Refers to a property. If the property is an indexer or takes parameters,
the parameter types are appended to the property name and enclosed with
parenthesis:
paranthesis:
\fIP:System.String.Length\fR,
\fIP:System.String.Chars(System.Int32)\fR.
.TP
+22 -31
View File
@@ -19,6 +19,14 @@ mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
\fImono\fP is a runtime implementation of the ECMA Common Language
Infrastructure. This can be used to run ECMA and .NET applications.
.PP
The runtime contains a native code generator that transforms the
Common Intermediate Language into native code.
.PP
The code generator can operate in two modes: just in time compilation
(JIT) or ahead of time compilation (AOT). Since code can be
dynamically loaded, the runtime environment and the JIT are always
present, even if code is compiled ahead of time.
.PP
The runtime loads the specified
.I file
and optionally passes
@@ -28,26 +36,12 @@ to it. The
.I file
is an ECMA assembly. They typically have a .exe or .dll extension.
.PP
These executables can reference additionaly functionality in the form
of assembly references. By default those assembly references are
resolved as follows: the \fBmscorlib.dll\fR is resolved from the
system profile that is configured by Mono, and other assemblies are
loaded from the Global Assembly Cache (GAC).
.PP
The runtime contains a native code generator that transforms the
Common Intermediate Language into native code.
.PP
The code generator can operate in two modes: just in time compilation
(JIT) or ahead of time compilation (AOT). Since code can be
dynamically loaded, the runtime environment and the JIT are always
present, even if code is compiled ahead of time.
.PP
The runtime provides a number of configuration options for running
applications, for developing and debugging, and for testing and
debugging the runtime itself.
.PP
The \fImono\fP command uses the moving and generational SGen garbage collector
while the \fImono-boehm\fP command uses the conservative Boehm
The \fImono\fP command uses the Boehm conservative garbage collector
while the \fImono-sgen\fP command uses a moving and generational
garbage collector.
.SH PORTABILITY
On Unix-based systems, Mono provides a mechanism to emulate the
@@ -93,7 +87,7 @@ information which is not available on the generated file. When
precompiling code, you might want to compile with all optimizations
(-O=all). Pre-compiled code is position independent code.
.Sp
Precompilation is just a mechanism to reduce startup time, increase
Pre compilation is just a mechanism to reduce startup time, increase
code sharing across multiple mono processes and avoid just-in-time
compilation program startup costs. The original assembly must still
be present, as the metadata is contained there.
@@ -328,8 +322,8 @@ List of additional directories to search for AOT images.
This instructs the Mono runtime to
start a debugging agent inside the Mono runtime and connect it to a
client user interface will control the Mono process.
This option is typically used by IDEs, like the MonoDevelop or Visual Studio IDEs.
.RS
This option is typically used by IDEs, like the MonoDevelop IDE.
.PP
The configuration is specified using one of more of the following options:
.RS
.ne 8
@@ -356,10 +350,10 @@ actively waits for the debugger front end to connect to the Mono process.
Mono will print out to stdout the IP address and port where it is listening.
.TP
.I setpgid=[y/n]
If set to yes, Mono will call \fBsetpgid(0, 0)\fR on startup, if that function
If set to yes, Mono will call \fBsetpgid(0, 0)\fB on startup, if that function
is available on the system. This is useful for ensuring that signals delivered
to a process that is executing the debuggee are not propagated to the debuggee,
e.g. when Ctrl-C sends \fBSIGINT\fR to the \fBsdb\fR tool.
e.g. when Ctrl-C sends \fBSIGINT\fB to the \fBsdb\fB tool.
.TP
.I suspend=[y/n]
Defaults to yes, with the default option Mono will suspend the vm on startup
@@ -602,7 +596,7 @@ platforms, and only when using gdb 7.0 or later.
Turns on profiling. For more information about profiling applications
and code coverage see the sections "PROFILING" and "CODE COVERAGE"
below.
.Sp
.TP
This option can be used multiple times, each time will load an
additional profiler. This allows developers to use modules that
extend the JIT through the Mono profiling interface.
@@ -683,7 +677,7 @@ Finally, namespaces can be specified using the N: prefix:
Don't align stack frames on the x86 architecture. By default, Mono
aligns stack frames to 16 bytes on x86, so that local floating point
and SIMD variables can be properly aligned. This option turns off the
alignment, which usually saves one instruction per call, but might
alignment, which usually saves one intruction per call, but might
result in significantly lower floating point and SIMD performance.
.TP
\fB--jitmap\fR
@@ -1766,7 +1760,7 @@ Captures the interrupt signal (Control-C) and displays a stack trace
when pressed. Useful to find out where the program is executing at a
given point. This only displays the stack trace of a single thread.
.TP
\fBinit-stacks\fR
\fBinit-stacks\FR
Instructs the runtime to initialize the stack with
some known values (0x2a on x86-64) at the start of a method to assist
in debuggin the JIT engine.
@@ -1806,14 +1800,11 @@ values.
This option allows using single-steps and breakpoints in hardware
where we cannot do it with signals.
.TP
\fBsuspend-on-native-crash\fR
This option will suspend the program when a native crash occurs (SIGSEGV, SIGILL, ...).
\fBsuspend-on-sigsegv\fR
This option will suspend the program when a native SIGSEGV is received.
This is useful for debugging crashes which do not happen under gdb,
since a live process contains more information than a core file.
.TP
\fBsuspend-on-sigsegv\fR
Same as \fBsuspend-on-native-crash\fR.
.TP
\fBsuspend-on-exception\fR
This option will suspend the program when an exception occurs.
.TP
@@ -2016,8 +2007,8 @@ http://www.mono-project.com/community/help/mailing-lists/
http://www.mono-project.com
.SH SEE ALSO
.PP
certmgr(1), cert-sync(1), csharp(1), gacutil(1), mcs(1), mdb(1), monocov(1), monodis(1),
mono-config(5), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1),
mono-config(5), mozroots(1), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
.PP
For more information on AOT:
http://www.mono-project.com/docs/advanced/aot/
+2 -2
View File
@@ -237,7 +237,7 @@ to the type name, while methods append the method name (with an optional count
of the number of generic parameters).
.Sp
If the constructor or method take arguments, these are listed within
parenthesis after the constructor/method name:
paranthesis after the constructor/method name:
.Sp
.I M:System.Object..ctor
,
@@ -259,7 +259,7 @@ Refers to a namespace, e.g.
.I "P:"
Refers to a property. If the property is an indexer or takes parameters,
the parameter types are appended to the property name and enclosed with
parenthesis:
paranthesis:
.I P:System.String.Length
,
.I P:System.String.Chars(System.Int32)
+1 -1
View File
@@ -407,7 +407,7 @@ mysql MySQL AB MySql.Data.MySqlClient MySql.Data
NOTES:
Ngsql is the .Net Data Provider for PosgreSQL. The
latest version can be downloaded from
latest verison can be downloaded from
http://npgsql.projects.postgresql.org/
MySql.Data is the MySQL Connector/Net for connecting to MySql databases.
+2 -2
View File
@@ -134,7 +134,7 @@
code ();
}
* Avoid using unnecessary open/close braces, vertical space
* Avoid using unecessary open/close braces, vertical space
is usually limited:
good:
@@ -474,4 +474,4 @@ class X : Y {
MyHelperClass.cli.cs
MyHelperClass.jvm.cs
By using partial classes.
By using partial classes.
+2 -11
View File
@@ -134,7 +134,7 @@ csproj-local: csproj-library csproj-test
intermediate_clean=$(subst /,-,$(intermediate))
csproj-library:
config_file=`basename $(LIBRARY) .dll`-$(intermediate_clean)$(PROFILE).input; \
case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; *"legacy"*) config_file=legacy_$$config_file;; esac; \
case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; esac; \
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
(echo $(is_boot); \
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
@@ -266,7 +266,7 @@ endif
# make dist will collect files in .sources files from all profiles
dist-local: dist-default
subs=' ' ; \
for f in `$(topdir)/tools/removecomments.sh $(filter-out $(wildcard *_test.dll.sources) $(wildcard *_xtest.dll.sources) $(wildcard *exclude.sources),$(wildcard *.sources))` $(TEST_FILES) ; do \
for f in `$(topdir)/tools/removecomments.sh $(filter-out $(wildcard *_test.dll.sources) $(wildcard *exclude.sources),$(wildcard *.sources))` $(TEST_FILES) ; do \
case $$f in \
../*) : ;; \
*.g.cs) : ;; \
@@ -377,12 +377,3 @@ $(the_libdir)/.doc-stamp: $(the_lib)
# Need to be here so it comes after the definition of DEP_DIRS/DEP_LIBS
gen-deps:
@echo "$(DEPS_TARGET_DIR): $(DEP_DIRS) $(DEP_LIBS)" >> $(DEPS_FILE)
# Should be $(BUILD_TOOLS_PROFILE) but still missing System.Windows.Forms
resx2sr=$(topdir)/class/lib/net_4_x/resx2sr.exe
update-corefx-sr: $(resx2sr) $(RESX_RESOURCE_STRING)
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(resx2sr) $(RESX_RESOURCE_STRING) >corefx/SR.cs
$(resx2sr):
$(MAKE) -C $(topdir)/tools/resx2sr
+9 -8
View File
@@ -1,15 +1,17 @@
# -*- makefile -*-
with_mono_path_monolite = MONO_PATH="$(topdir)/class/lib/monolite$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/monolite/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
monolite_path := $(topdir)/class/lib/monolite/$(MONO_CORLIB_VERSION)
with_mono_path_monolite = MONO_PATH="$(monolite_path)$(PLATFORM_PATH_SEPARATOR)$(monolite_path)/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
monolite_flag := $(depsdir)/use-monolite
use_monolite := $(wildcard $(monolite_flag))
MONOLITE_MSCORLIB = $(topdir)/class/lib/monolite/mscorlib.dll
MONOLITE_MSCORLIB = $(monolite_path)/mscorlib.dll
ifdef use_monolite
ifdef MCS_MODE
CSC_LOCATION = $(topdir)/class/lib/monolite/mcs.exe
CSC_LOCATION = $(monolite_path)/mcs.exe
endif
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
@@ -79,8 +81,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
else \
echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
echo "*** You need Mono version 4.8 or better installed to build MCS" 1>&2 ; \
echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
echo "*** Check README for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
@@ -89,7 +90,7 @@ ifdef use_monolite
do-get-monolite:
do-profile-check-monolite:
@echo "*** The contents of your 'monolite' directory may be out-of-date" 1>&2
@echo "*** The contents of your 'monolite/$(MONO_CORLIB_VERSION)' directory may be out-of-date" 1>&2
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
rm -f $(monolite_flag)
exit 1
@@ -97,12 +98,12 @@ do-profile-check-monolite:
else
do-get-monolite:
@echo "*** Downloading bootstrap required 'monolite'" 1>&2
@echo "*** Downloading bootstrap required 'monolite/$(MONO_CORLIB_VERSION)'" 1>&2
$(MAKE) $(MAKE_Q) -C $(mono_build_root) get-monolite-latest
do-profile-check-monolite: $(depsdir)/.stamp
@echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
@echo "*** Trying the 'monolite' directory." 1>&2
@echo "*** Trying the 'monolite/$(MONO_CORLIB_VERSION)' directory." 1>&2
@echo dummy > $(monolite_flag)
$(MAKE) do-profile-check
+2
View File
@@ -25,12 +25,14 @@ PROFILE_MCS_FLAGS = \
-d:MOBILE_DYNAMIC \
-d:MONODROID \
-d:ANDROID \
-d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
@@ -27,6 +27,7 @@ PROFILE_MCS_FLAGS = \
-d:DISABLE_REMOTING \
-d:DISABLE_COM \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
+1
View File
@@ -21,6 +21,7 @@ PROFILE_MCS_FLAGS = \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MONO \
-d:NETSTANDARD \
-d:MOBILE,MOBILE_LEGACY \
-d:FULL_AOT_DESKTOP \
-d:FULL_AOT_RUNTIME \
+1
View File
@@ -21,6 +21,7 @@ PROFILE_MCS_FLAGS = \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MONO \
-d:NETSTANDARD \
-d:MOBILE,MOBILE_LEGACY \
-d:FULL_AOT_DESKTOP \
-d:FULL_AOT_RUNTIME \
@@ -23,6 +23,7 @@ PROFILE_MCS_FLAGS = \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MONO \
-d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
+1
View File
@@ -21,6 +21,7 @@ PROFILE_MCS_FLAGS = \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MONO \
-d:NETSTANDARD \
-d:MOBILE,MOBILE_LEGACY \
-d:FULL_AOT_DESKTOP \
-d:FULL_AOT_RUNTIME \
+1
View File
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
-d:XAMMAC \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-d:XAMARIN_MODERN \
-d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
+1 -1
View File
@@ -33,7 +33,7 @@ USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_M
USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
CSC_RUNTIME_FLAGS = --aot-path=$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE) --gc-params=nursery-size=64m
CSC_RUNTIME_FLAGS = --aot-path=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) --gc-params=nursery-size=64m
BASCOMPILE = $(MBAS) $(USE_MBAS_FLAGS)
CCOMPILE = $(CC) $(USE_CFLAGS)
BOOT_COMPILE = $(Q_MCS) $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS)
-80
View File
@@ -20,18 +20,8 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
ifndef NO_TEST
test_nunit_lib = nunitlite.dll
xunit_core := xunit.core xunit.abstractions xunit.assert
xunit_deps := System.Runtime
xunit_class_deps := Xunit.NetCore.Extensions
xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
xunit_libs_ref += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/Facades/%.dll,$(xunit_deps))
xunit_libs_dep = $(xunit_class_deps:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%.dll)
xunit_libs_ref += $(xunit_libs_dep:%=-r:%)
TEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(TEST_LIB_REFS))
XTEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(XTEST_LIB_REFS))
test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%)
test_nunit_ref = $(test_nunit_dep:%=-r:%)
@@ -44,7 +34,6 @@ test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
endif
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
test_sourcefile_excludes = $(test_lib).exclude.sources
test_pdb = $(test_lib:.dll=.pdb)
@@ -53,26 +42,12 @@ test_makefrag = $(depsdir)/$(test_lib).makefrag
test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
ifeq ($(wildcard $(xtest_sourcefile)),)
xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
endif
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
xtest_response = $(depsdir)/$(xtest_lib).response
xtest_makefrag = $(depsdir)/$(xtest_lib).makefrag
xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS)
ifndef HAVE_CS_TESTS
HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
endif
HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
HAVE_CS_XTESTS := $(wildcard $(xtest_sourcefile))
endif # !NO_TEST
ifndef NO_TEST
@@ -86,10 +61,6 @@ endif
echo "stamp" >$@
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)Xunit.NetCore.Extensions.dll:
$(MAKE) -C $(topdir)/class/Xunit.NetCore.Extensions
endif
test_assemblies :=
@@ -186,57 +157,6 @@ $(test_makefrag): $(test_response)
-include $(test_makefrag)
build-test-lib: $(test_lib)
@echo Building testing lib
endif
ifdef HAVE_CS_XTESTS
XTEST_HARNESS_PATH = $(topdir)/../external/xunit-binaries
XTEST_HARNESS = $(XTEST_HARNESS_PATH)/xunit.console.exe
XTEST_HARNESS_FLAGS := -noappdomain -noshadow -parallel none -nunit TestResult-$(PROFILE)-xunit.xml
XTEST_TRAIT := -notrait category=failing -notrait category=nonnetcoreapptests -notrait Benchmark=true -notrait category=outerloop
ifdef FIXTURE
XTEST_HARNESS_FLAGS += -class $(FIXTURE)
endif
ifdef TESTNAME
XTEST_HARNESS_FLAGS += -method $(TESTNAME)
endif
check: run-xunit-test-local
run-xunit-test: run-xunit-test-local
xunit-test-local: $(xunit_test_lib)
run-xunit-test-local: run-xunit-test-lib
# ln -s is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
run-xunit-test-lib: xunit-test-local
@ln -fs $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
$$ok
@rm -f xunit.execution.desktop.dll
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response)
xtest_response_preprocessed = $(xtest_response)_preprocessed
# This handles .excludes/.sources pairs, as well as resolving the
# includes that occur in .sources files
$(xtest_response): $(xtest_sourcefile)
$(SHELL) $(topdir)/build/gensources.sh $@ '$(xtest_sourcefile)' '$(xtest_sourcefile_excludes)'
$(xtest_makefrag): $(xtest_response)
@echo Creating $@ ...
@sed 's,^,$(xunit_test_lib): ,' $< >$@
-include $(xtest_makefrag)
endif
.PHONY: patch-nunitlite-appconfig
@@ -55,7 +55,9 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\..\..\external\corefx\src\System.Data.Common\src\System\Data\Common\DbColumn.cs" />
<Compile Include="..\..\..\..\external\corefx\src\System.Data.Common\src\System\Data\Common\DbDataReaderExtensions.Facade.cs" />
<Compile Include="..\..\..\..\external\corefx\src\System.Data.Common\src\System\Data\IColumnMappingCollection.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -1,4 +1,6 @@
TypeForwarders.cs
AssemblyInfo.cs
../../../../external/corefx/src/System.Data.Common/src/System/Data/IColumnMappingCollection.cs
../../../../external/corefx/src/System.Data.Common/src/System/Data/Common/DbColumn.cs
../../../../external/corefx/src/System.Data.Common/src/System/Data/Common/DbDataReaderExtensions.Facade.cs
@@ -23,7 +23,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbColumn))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommand))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
@@ -39,7 +38,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowVersion))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DbType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IColumnMappingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameterCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataReader))]
@@ -25,7 +25,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventChannel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommand))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommandEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCounter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventDataAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldFormat))]
@@ -45,3 +44,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
#if NETSTANDARD
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCounter))]
#endif
@@ -38,13 +38,16 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketInformationOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketOptionLevel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketOptionName))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveFromResult))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveMessageFromResult))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketShutdown))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketTaskExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.TcpClient))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.TcpListener))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.TransmitFileOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpClient))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpReceiveResult))]
#if NETSTANDARD
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveFromResult))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveMessageFromResult))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketTaskExtensions))]
#endif
@@ -1,4 +1,4 @@
TypeForwarders.cs
AssemblyInfo.cs
SR.cs
../../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/IncrementalHash.net46.cs
../../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/IncrementalHash.net46.cs
+5 -6
View File
@@ -9,13 +9,12 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = netstandard.dll
KEY_FILE = ../../msfinal.pub
KEY_FILE = ../../Open.snk
LIBRARY_SNK = $(KEY_FILE)
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699 /nowarn:618
LIB_REFS = System System.Xml System.Xml.Linq System.Runtime.Serialization System.Core System.Numerics System.Numerics.Vectors System.Net.Http System.Transactions \
LIB_REFS = System System.Xml System.Xml.Linq System.Runtime.Serialization System.Core System.Numerics System.Net.Http System.Transactions \
System.IO.Compression System.Data System.ComponentModel.Composition System.IO.Compression.FileSystem \
Facades/System.Security.Cryptography.Algorithms Facades/System.Globalization.Extensions Facades/System.Data.Common \
Facades/System.Diagnostics.StackTrace Facades/System.Runtime.Serialization.Xml Facades/System.Runtime.Serialization.Primitives \
Facades/System.Security.SecureString Facades/System.Threading.Overlapped Facades/System.Xml.XPath.XDocument
Facades/System.Security.Cryptography.Algorithms
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Web.Services
@@ -23,7 +22,7 @@ else
LIB_REFS += System.Web System.Drawing
endif
LIB_MCS_FLAGS = $(SIGN_FLAGS)
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
PLATFORM_DEBUG_FLAGS =
@@ -5,8 +5,6 @@
// dotnetcli\dotnet.exe Tools\GenAPI.exe -assembly:bin\ref\netstandard\2.0.0.0\netstandard.dll -writer:TypeForwards
//
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.SqlServer.Server.SqlDataRecord))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.SqlServer.Server.SqlMetaData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeFileHandle))]
@@ -218,7 +216,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(string))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.StringComparer))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.StringComparison))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.StringNormalizationExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.StringSplitOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SystemException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ThreadStaticAttribute))]
@@ -319,8 +316,8 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ISet<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyNotFoundException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair<,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.LinkedListNode<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.LinkedList<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.LinkedListNode<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.List<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Queue<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.SortedDictionary<,>))]
@@ -709,14 +706,12 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DataColumnMappingCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DataTableMapping))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DataTableMappingCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbColumn))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbCommand))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbCommandBuilder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbConnection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbConnectionStringBuilder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbDataAdapter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbDataReader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbDataReaderExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbDataRecord))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbDataSourceEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbEnumerator))]
@@ -729,34 +724,12 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbProviderSpecificTypePropertyAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbTransaction))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.GroupByBehavior))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.IDbColumnSchemaGenerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.IdentifierCase))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.RowUpdatedEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.RowUpdatingEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SchemaTableColumn))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SchemaTableOptionalColumn))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SupportedJoinOperators))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.ApplicationIntent))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SortOrder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopy))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyColumnMapping))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlClientFactory))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlCommand))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlConnection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlConnectionStringBuilder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlDataReader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlError))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlErrorCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlInfoMessageEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlInfoMessageEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlParameter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlParameterCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlRowsCopiedEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlRowsCopiedEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlTransaction))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.INullable))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlAlreadyFilledException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlBinary))]
@@ -800,7 +773,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.DebuggerVisualizerAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.DefaultTraceListener))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.DelimitedListTraceListener))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.EventTypeFilter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.FileVersionInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.MonitoringDescriptionAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
@@ -815,7 +787,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.SourceLevels))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.SourceSwitch))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.StackFrame))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.StackFrameExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.StackTrace))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Stopwatch))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Switch))]
@@ -934,7 +905,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DaylightTime))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DigitShapes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.EastAsianLunisolarCalendar))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GlobalizationExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendar))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendarTypes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.HebrewCalendar))]
@@ -1071,9 +1041,9 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.DynamicExpressionVisitor))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.ElementInit))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.Expression))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.Expression<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.ExpressionType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.ExpressionVisitor))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.Expression<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.GotoExpression))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.GotoExpressionKind))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.IArgumentProvider))]
@@ -1361,11 +1331,9 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Plane))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Quaternion))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector2))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector3))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector4))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.AmbiguousMatchException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.AssemblyAlgorithmIdAttribute))]
@@ -1488,9 +1456,9 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallerLineNumberAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallerMemberNameAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallSite))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallSite<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallSiteBinder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallSiteHelpers))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CallSite<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilationRelaxations))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilationRelaxationsAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute))]
@@ -1642,8 +1610,8 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.VarEnum))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.VariantWrapper))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.ADVF))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.BINDPTR))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.BIND_OPTS))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.BINDPTR))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.CALLCONV))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.CONNECTDATA))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.DATADIR))]
@@ -1703,7 +1671,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContractAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContractResolver))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContractSerializer))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContractSerializerExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContractSerializerSettings))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataMemberAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DateTimeFormat))]
@@ -1724,7 +1691,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ISafeSerializationData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ISerializable))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ISerializationSurrogate))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ISerializationSurrogateProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ISurrogateSelector))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.KnownTypeAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.ObjectIDGenerator))]
@@ -1770,7 +1736,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.ISecurityEncodable))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.PartialTrustVisibilityLevel))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.SecureString))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.SecureStringMarshal))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.SecurityCriticalAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.SecurityCriticalScope))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.SecurityElement))]
@@ -1802,7 +1767,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimTypes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimValueTypes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Aes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesManaged))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsnEncodedData))]
@@ -1849,7 +1813,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECCurve))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellmanPublicKey))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDsa))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDsaCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECParameters))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECPoint))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.FromBase64Transform))]
@@ -1912,7 +1875,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SymmetricAlgorithm))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ToBase64Transform))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDES))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDESCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDESCryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.OpenFlags))]
@@ -2004,8 +1966,8 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AbandonedMutexException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ApartmentState))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AsyncFlowControl))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AsyncLocalValueChangedArgs<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AsyncLocal<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AsyncLocalValueChangedArgs<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.AutoResetEvent))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Barrier))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.BarrierPostPhaseException))]
@@ -2034,7 +1996,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.NativeOverlapped))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Overlapped))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ParameterizedThreadStart))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.PreAllocatedOverlapped))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ReaderWriterLock))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ReaderWriterLockSlim))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.RegisteredWaitHandle))]
@@ -2053,7 +2014,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadInterruptedException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadLocal<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadPool))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadPoolBoundHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadPriority))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadStart))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.ThreadStartException))]
@@ -2074,6 +2034,7 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ParallelLoopState))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ParallelOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskCanceledException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskCompletionSource<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskContinuationOptions))]
@@ -2084,7 +2045,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskScheduler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskSchedulerException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskStatus))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.UnobservedTaskExceptionEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Timers.ElapsedEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Timers.ElapsedEventHandler))]
@@ -2390,7 +2350,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Serialization.XmlTypeMapping))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.Extensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.IXPathNavigable))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XDocumentExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XmlCaseOrder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XmlDataType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XmlSortOrder))]
+1 -2
View File
@@ -111,7 +111,6 @@ monodroid_dirs := \
$(mobile_common_dirs) \
Mono.CompilerServices.SymbolWriter \
Mono.Btls.Interface \
Mono.Posix \
$(pcl_facade_dirs)
monotouch_dirs := \
@@ -391,7 +390,7 @@ all-local $(STD_TARGETS:=-local):
all-local-aot:
monolite_dir := monolite
monolite_dir := monolite/$(MONO_CORLIB_VERSION)
# Files needed to bootstrap C# compiler
build_files = mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
@@ -168,19 +168,19 @@ namespace Microsoft.Build.BuildEngine {
yield return kvp.Value;
}
public void RemoveProperty (BuildProperty property)
public void RemoveProperty (BuildProperty propertyToRemove)
{
if (property == null)
throw new ArgumentNullException ("property");
if (propertyToRemove == null)
throw new ArgumentNullException ("propertyToRemove");
if (FromXml) {
if (!property.FromXml)
if (!propertyToRemove.FromXml)
throw new InvalidOperationException ("The specified property does not belong to the current property group.");
property.XmlElement.ParentNode.RemoveChild (property.XmlElement);
properties.Remove (property);
propertyToRemove.XmlElement.ParentNode.RemoveChild (propertyToRemove.XmlElement);
properties.Remove (propertyToRemove);
} else
propertiesByName.Remove (property.Name);
propertiesByName.Remove (propertyToRemove.Name);
}
public void RemoveProperty (string propertyName)
@@ -296,14 +296,14 @@ namespace Microsoft.Build.BuildEngine
return build_records.GetOrAdd (key, _ => new BuildRecord (this));
}
public void BuildStartedHandler (object sender, BuildStartedEventArgs e)
public void BuildStartedHandler (object sender, BuildStartedEventArgs args)
{
GetBuildRecord (sender).BuildStartedHandler (sender, e);
GetBuildRecord (sender).BuildStartedHandler (sender, args);
}
public void BuildFinishedHandler (object sender, BuildFinishedEventArgs e)
public void BuildFinishedHandler (object sender, BuildFinishedEventArgs args)
{
GetBuildRecord (sender).BuildFinishedHandler (e);
GetBuildRecord (sender).BuildFinishedHandler (args);
((IDictionary) build_records).Remove (sender);
}
@@ -315,47 +315,47 @@ namespace Microsoft.Build.BuildEngine
{
GetBuildRecord (sender).PopEvent (args);
}
public void ProjectStartedHandler (object sender, ProjectStartedEventArgs e)
public void ProjectStartedHandler (object sender, ProjectStartedEventArgs args)
{
GetBuildRecord (sender).ProjectStartedHandler (e);
GetBuildRecord (sender).ProjectStartedHandler (args);
}
public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs e)
public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs args)
{
GetBuildRecord (sender).ProjectFinishedHandler (e);
GetBuildRecord (sender).ProjectFinishedHandler (args);
}
public void TargetStartedHandler (object sender, TargetStartedEventArgs e)
public void TargetStartedHandler (object sender, TargetStartedEventArgs args)
{
GetBuildRecord (sender).TargetStartedHandler (e);
GetBuildRecord (sender).TargetStartedHandler (args);
}
public void TargetFinishedHandler (object sender, TargetFinishedEventArgs e)
public void TargetFinishedHandler (object sender, TargetFinishedEventArgs args)
{
GetBuildRecord (sender).TargetFinishedHandler (e);
GetBuildRecord (sender).TargetFinishedHandler (args);
}
public void TaskStartedHandler (object sender, TaskStartedEventArgs e)
public void TaskStartedHandler (object sender, TaskStartedEventArgs args)
{
GetBuildRecord (sender).TaskStartedHandler (e);
GetBuildRecord (sender).TaskStartedHandler (args);
}
public void TaskFinishedHandler (object sender, TaskFinishedEventArgs e)
public void TaskFinishedHandler (object sender, TaskFinishedEventArgs args)
{
GetBuildRecord (sender).TaskFinishedHandler (e);
GetBuildRecord (sender).TaskFinishedHandler (args);
}
public void MessageHandler (object sender, BuildMessageEventArgs e)
public void MessageHandler (object sender, BuildMessageEventArgs args)
{
GetBuildRecord (sender).MessageHandler (e);
GetBuildRecord (sender).MessageHandler (args);
}
public void WarningHandler (object sender, BuildWarningEventArgs e)
public void WarningHandler (object sender, BuildWarningEventArgs args)
{
GetBuildRecord (sender).WarningHandler (e);
GetBuildRecord (sender).WarningHandler (args);
}
public void ErrorHandler (object sender, BuildErrorEventArgs e)
public void ErrorHandler (object sender, BuildErrorEventArgs args)
{
GetBuildRecord (sender).ErrorHandler (e);
GetBuildRecord (sender).ErrorHandler (args);
}
[MonoTODO]
public void CustomEventHandler (object sender, CustomBuildEventArgs e)
public void CustomEventHandler (object sender, CustomBuildEventArgs args)
{
build_records [sender].CustomHandler (e);
build_records [sender].CustomHandler (args);
}
void SetColor (ConsoleColor color)
@@ -131,17 +131,17 @@ namespace Microsoft.Build.BuildEngine {
}
[MonoTODO ("Not tested")]
public void AddNewImport (string projectFile,
string condition)
public void AddNewImport (string importLocation,
string importCondition)
{
if (projectFile == null)
throw new ArgumentNullException ("projectFile");
if (importLocation == null)
throw new ArgumentNullException ("importLocation");
XmlElement importElement = xmlDocument.CreateElement ("Import", XmlNamespace);
xmlDocument.DocumentElement.AppendChild (importElement);
importElement.SetAttribute ("Project", projectFile);
if (!String.IsNullOrEmpty (condition))
importElement.SetAttribute ("Condition", condition);
importElement.SetAttribute ("Project", importLocation);
if (!String.IsNullOrEmpty (importCondition))
importElement.SetAttribute ("Condition", importCondition);
AddImport (importElement, null, false);
MarkProjectAsDirty ();
@@ -506,9 +506,9 @@ namespace Microsoft.Build.BuildEngine {
Load (projectFileName, ProjectLoadSettings.None);
}
public void Load (string projectFileName, ProjectLoadSettings projectLoadSettings)
public void Load (string projectFileName, ProjectLoadSettings settings)
{
project_load_settings = projectLoadSettings;
project_load_settings = settings;
if (String.IsNullOrEmpty (projectFileName))
throw new ArgumentNullException ("projectFileName");
@@ -644,7 +644,7 @@ namespace Microsoft.Build.BuildEngine {
[MonoTODO]
// NOTE: does not modify imported projects
public void RemoveItemGroupsWithMatchingCondition (string matchCondition)
public void RemoveItemGroupsWithMatchingCondition (string matchingCondition)
{
throw new NotImplementedException ();
}
@@ -697,9 +697,9 @@ namespace Microsoft.Build.BuildEngine {
isDirty = false;
}
public void Save (TextWriter textWriter)
public void Save (TextWriter outTextWriter)
{
xmlDocument.Save (textWriter);
xmlDocument.Save (outTextWriter);
isDirty = false;
}
@@ -733,12 +733,12 @@ namespace Microsoft.Build.BuildEngine {
throw new NotImplementedException ();
}
public void SetProjectExtensions (string id, string content)
public void SetProjectExtensions (string id, string xmlText)
{
if (id == null)
throw new ArgumentNullException ("id");
if (content == null)
throw new ArgumentNullException ("content");
if (xmlText == null)
throw new ArgumentNullException ("xmlText");
XmlNode projectExtensions, node;
@@ -749,7 +749,7 @@ namespace Microsoft.Build.BuildEngine {
xmlDocument.DocumentElement.AppendChild (projectExtensions);
node = xmlDocument.CreateElement (id, XmlNamespace);
node.InnerXml = content;
node.InnerXml = xmlText;
projectExtensions.AppendChild (node);
} else {
node = xmlDocument.SelectSingleNode (String.Format ("/tns:Project/tns:ProjectExtensions/tns:{0}", id), XmlNamespaceManager);
@@ -759,7 +759,7 @@ namespace Microsoft.Build.BuildEngine {
projectExtensions.AppendChild (node);
}
node.InnerXml = content;
node.InnerXml = xmlText;
}
@@ -111,11 +111,11 @@ namespace Microsoft.Build.BuildEngine {
}
// FIXME: shouldn't we remove it from XML?
public void RemoveTask (BuildTask taskElement)
public void RemoveTask (BuildTask buildTask)
{
if (taskElement == null)
throw new ArgumentNullException ("taskElement");
buildTasks.Remove (taskElement);
if (buildTask == null)
throw new ArgumentNullException ("buildTask");
buildTasks.Remove (buildTask);
}
bool Build ()
@@ -45,9 +45,9 @@ namespace Microsoft.Build.Construction
get { return Line == 0 ? File : String.Format ("{0} ({1}{2})", File, Line, Column != 0 ? "," + Column : String.Empty); }
}
public override bool Equals (object obj)
public override bool Equals (object other)
{
var o = obj as ElementLocation;
var o = other as ElementLocation;
return (object) o != null && o.File == File && o.Line == Line && o.Column == Column;
}
@@ -79,27 +79,27 @@ namespace Microsoft.Build.Evaluation
+ "{data.Items.Count} #Targets={data.Targets.Count}")]
public class Project
{
public Project (XmlReader xmlReader)
: this (ProjectRootElement.Create (xmlReader))
public Project (XmlReader xml)
: this (ProjectRootElement.Create (xml))
{
}
public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
public Project (XmlReader xml, IDictionary<string, string> globalProperties,
string toolsVersion)
: this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion)
: this (ProjectRootElement.Create (xml), globalProperties, toolsVersion)
{
}
public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
public Project (XmlReader xml, IDictionary<string, string> globalProperties,
string toolsVersion, ProjectCollection projectCollection)
: this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection)
: this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection)
{
}
public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
public Project (XmlReader xml, IDictionary<string, string> globalProperties,
string toolsVersion, ProjectCollection projectCollection,
ProjectLoadSettings loadSettings)
: this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection, loadSettings)
: this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection, loadSettings)
{
}
@@ -49,15 +49,15 @@ namespace Microsoft.Build.Evaluation
{
public class ProjectCollection : IDisposable
{
public delegate void ProjectAddedEventHandler (object sender, ProjectAddedToProjectCollectionEventArgs e);
public delegate void ProjectAddedEventHandler (object target, ProjectAddedToProjectCollectionEventArgs args);
public class ProjectAddedToProjectCollectionEventArgs : EventArgs
{
public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement element)
public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement project)
{
if (element == null)
if (project == null)
throw new ArgumentNullException ("project");
ProjectRootElement = element;
ProjectRootElement = project;
}
public ProjectRootElement ProjectRootElement { get; private set; }
@@ -98,8 +98,8 @@ namespace Microsoft.Build.Evaluation
{
}
public ProjectCollection (ToolsetDefinitionLocations toolsetLocations)
: this (null, null, toolsetLocations)
public ProjectCollection (ToolsetDefinitionLocations toolsetDefinitionLocations)
: this (null, null, toolsetDefinitionLocations)
{
}
+1 -3
View File
@@ -4,10 +4,8 @@ include ../../build/rules.make
LIBRARY = Microsoft.CSharp.dll
LIB_REFS = System.Core System
LIB_REFS = System.Core Mono.CSharp
LIB_MCS_FLAGS =
RESX_RESOURCE_STRING = ../../../external/corefx/src/Microsoft.CSharp/src/Resources/Strings.resx
include ../../build/library.make
@@ -49,201 +49,29 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Binder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\BinderHelper.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpArgumentInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpArgumentInfoFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpBinderFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpCallFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpConversionKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpConvertBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpGetIndexBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpGetMemberBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpInvokeBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpInvokeConstructorBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpInvokeMemberBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpIsEventBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpSetIndexBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpSetMemberBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\CSharpUnaryOperationBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Error.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\CController.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\CError.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\CErrorFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\CParameterizedError.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\ErrorCode.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\ErrorFacts.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\ErrorFmt.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\IErrorSink.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\MessageID.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\ICSharpInvokeOrInvokeMemberBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\ResetBindException.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\RuntimeBinderController.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\RuntimeBinderException.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\RuntimeBinderInternalCompilerException.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Binding\ErrorReporting.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BindingContextBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BindingContexts.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BindingFlag.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BinOpArgInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BinOpKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\BinOpSig.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\CandidateFunctionMember.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ConstVal.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ConstValFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\AggregateDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\Declaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\GlobalAttributeDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\NamespaceDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\EXPRExtensions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExprFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\EXPRFLAG.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\FileRecord.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\FundamentalTypes.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\GlobalSymbolContext.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinderResult.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\InputFile.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ITypeOrNamespace.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\LangCompiler.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MetadataToken.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MethodKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\NameGenerator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\NullableLift.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\OriginalExpressions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedAttributes.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\SubstitutionContext.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AggregateSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AssemblyQualifiedNamespaceSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\IndexerSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LabelSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MiscSymFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\NamespaceOrAggregateSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\NamespaceSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\ParentSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\PropertySymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Scope.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Symbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolManagerBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolMask.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactoryBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TransparentIdentifierMemberSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TypeParameterSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\UnresolvedAggregateSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayLength.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Assignment.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Block.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BoundAnonymousFunction.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Call.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Cast.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ConditionalOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Event.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExpressionIterator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Field.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\FieldInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\HoistedLocal.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\List.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\LocalVariable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodReference.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\NamedArgumentSpecification.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Property.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Return.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Statement.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Temporary.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\This.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\TypeArguments.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\TypeOf.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\TypeOrNamespace.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UnaryOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UnboundAnonymousFunction.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedConversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedLogicalOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExprVisitorBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ZeroInitialize.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArgumentListType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\BoundLambdaType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\ErrorType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\MethodGroupType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\OpenTypePlaceholderType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\Type.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeKind.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Types\VoidType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\UnaOpSig.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\UtilityTypeExtensions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\WithType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\SpecialNames.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\SymbolTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\KnownName.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\NameManager.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\Names.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\NameTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\Operators.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\PredefinedName.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\PredefinedType.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\TokenFacts.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Syntax\TokenKind.cs" />
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\SR.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
<Compile Include="corefx\SR.cs" />␍ </ItemGroup>
<Compile Include="Microsoft.CSharp.RuntimeBinder\Binder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpArgumentInfo.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpArgumentInfoFlags.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpBinaryOperationBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpBinderFlags.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpConvertBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpGetIndexBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpGetMemberBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpInvokeBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpInvokeConstructorBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpInvokeMemberBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpIsEventBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpSetIndexBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpSetMemberBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\CSharpUnaryOperationBinder.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\DynamicContext.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\ErrorPrinter.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\Extensions.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\RuntimeBinderContext.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\RuntimeBinderException.cs" />
<Compile Include="Microsoft.CSharp.RuntimeBinder\RuntimeBinderInternalCompilerException.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -274,9 +102,9 @@
<Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>
<Name>System.Core-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../System/System-net_4_x.csproj">
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
<Name>System-net_4_x</Name>
<ProjectReference Include="../Mono.CSharp/Mono.CSharp-net_4_x.csproj">
<Project>{BEFCA993-98B4-48E9-8D68-1ACCB1FA7200}</Project>
<Name>Mono.CSharp-net_4_x</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,96 @@
//
// Binder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Linq.Expressions;
using System.Reflection;
namespace Microsoft.CSharp.RuntimeBinder
{
public static class Binder
{
public static CallSiteBinder BinaryOperation (CSharpBinderFlags flags, ExpressionType operation, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpBinaryOperationBinder (operation, flags, context, argumentInfo);
}
public static CallSiteBinder Convert (CSharpBinderFlags flags, Type type, Type context)
{
return new CSharpConvertBinder (type, context, flags);
}
public static CallSiteBinder GetIndex (CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpGetIndexBinder (context, argumentInfo);
}
public static CallSiteBinder GetMember (CSharpBinderFlags flags, string name, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpGetMemberBinder (name, context, argumentInfo);
}
public static CallSiteBinder Invoke (CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpInvokeBinder (flags, context, argumentInfo);
}
public static CallSiteBinder InvokeConstructor (CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
// What are flags for here
return new CSharpInvokeConstructorBinder (context, argumentInfo);
}
public static CallSiteBinder InvokeMember (CSharpBinderFlags flags, string name, IEnumerable<Type> typeArguments, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpInvokeMemberBinder (flags, name, context, typeArguments, argumentInfo);
}
public static CallSiteBinder IsEvent (CSharpBinderFlags flags, string name, Type context)
{
return new CSharpIsEventBinder (name, context);
}
public static CallSiteBinder SetIndex (CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpSetIndexBinder (flags, context, argumentInfo);
}
public static CallSiteBinder SetMember (CSharpBinderFlags flags, string name, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpSetMemberBinder (flags, name, context, argumentInfo);
}
public static CallSiteBinder UnaryOperation (CSharpBinderFlags flags, ExpressionType operation, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
return new CSharpUnaryOperationBinder (operation, flags, context, argumentInfo);
}
}
}
@@ -0,0 +1,83 @@
//
// CSharpArgumentInfo.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
public sealed class CSharpArgumentInfo
{
readonly CSharpArgumentInfoFlags flags;
readonly string name;
CSharpArgumentInfo (CSharpArgumentInfoFlags flags, string name)
{
this.flags = flags;
this.name = name;
}
public static CSharpArgumentInfo Create (CSharpArgumentInfoFlags flags, string name)
{
return new CSharpArgumentInfo (flags, name);
}
internal Compiler.Argument.AType ArgumentModifier {
get {
if ((flags & CSharpArgumentInfoFlags.IsRef) != 0)
return Compiler.Argument.AType.Ref;
if ((flags & CSharpArgumentInfoFlags.IsOut) != 0)
return Compiler.Argument.AType.Out;
return Compiler.Argument.AType.None;
}
}
internal static CallInfo CreateCallInfo (IEnumerable<CSharpArgumentInfo> argumentInfo, int skipCount)
{
var named = from arg in argumentInfo.Skip (skipCount) where arg.IsNamed select arg.name;
return new CallInfo (Math.Max (0, argumentInfo.Count () - skipCount), named);
}
internal CSharpArgumentInfoFlags Flags {
get { return flags; }
}
internal bool IsNamed {
get { return (flags & CSharpArgumentInfoFlags.NamedArgument) != 0; }
}
internal string Name {
get { return name; }
}
}
}
@@ -0,0 +1,44 @@
//
// CSharpArgumentInfoFlags.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Microsoft.CSharp.RuntimeBinder
{
[Flags]
public enum CSharpArgumentInfoFlags
{
None = 0,
UseCompileTimeType = 1,
Constant = 2,
NamedArgument = 4,
IsRef = 8,
IsOut = 16,
IsStaticType = 32
}
}
@@ -0,0 +1,160 @@
//
// CSharpBinaryOperationBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpBinaryOperationBinder : BinaryOperationBinder
{
IList<CSharpArgumentInfo> argumentInfo;
readonly CSharpBinderFlags flags;
readonly Type context;
public CSharpBinaryOperationBinder (ExpressionType operation, CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (operation)
{
this.argumentInfo = new ReadOnlyCollectionBuilder<CSharpArgumentInfo> (argumentInfo);
if (this.argumentInfo.Count != 2)
throw new ArgumentException ("Binary operation requires 2 arguments");
this.flags = flags;
this.context = context;
}
Compiler.Binary.Operator GetOperator (out bool isCompound)
{
isCompound = false;
switch (Operation) {
case ExpressionType.Add:
return Compiler.Binary.Operator.Addition;
case ExpressionType.AddAssign:
isCompound = true;
return Compiler.Binary.Operator.Addition;
case ExpressionType.And:
return (flags & CSharpBinderFlags.BinaryOperationLogical) != 0 ?
Compiler.Binary.Operator.LogicalAnd : Compiler.Binary.Operator.BitwiseAnd;
case ExpressionType.AndAssign:
isCompound = true;
return Compiler.Binary.Operator.BitwiseAnd;
case ExpressionType.Divide:
return Compiler.Binary.Operator.Division;
case ExpressionType.DivideAssign:
isCompound = true;
return Compiler.Binary.Operator.Division;
case ExpressionType.Equal:
return Compiler.Binary.Operator.Equality;
case ExpressionType.ExclusiveOr:
return Compiler.Binary.Operator.ExclusiveOr;
case ExpressionType.ExclusiveOrAssign:
isCompound = true;
return Compiler.Binary.Operator.ExclusiveOr;
case ExpressionType.GreaterThan:
return Compiler.Binary.Operator.GreaterThan;
case ExpressionType.GreaterThanOrEqual:
return Compiler.Binary.Operator.GreaterThanOrEqual;
case ExpressionType.LeftShift:
return Compiler.Binary.Operator.LeftShift;
case ExpressionType.LeftShiftAssign:
isCompound = true;
return Compiler.Binary.Operator.LeftShift;
case ExpressionType.LessThan:
return Compiler.Binary.Operator.LessThan;
case ExpressionType.LessThanOrEqual:
return Compiler.Binary.Operator.LessThanOrEqual;
case ExpressionType.Modulo:
return Compiler.Binary.Operator.Modulus;
case ExpressionType.ModuloAssign:
isCompound = true;
return Compiler.Binary.Operator.Modulus;
case ExpressionType.Multiply:
return Compiler.Binary.Operator.Multiply;
case ExpressionType.MultiplyAssign:
isCompound = true;
return Compiler.Binary.Operator.Multiply;
case ExpressionType.NotEqual:
return Compiler.Binary.Operator.Inequality;
case ExpressionType.Or:
return (flags & CSharpBinderFlags.BinaryOperationLogical) != 0 ?
Compiler.Binary.Operator.LogicalOr : Compiler.Binary.Operator.BitwiseOr;
case ExpressionType.OrAssign:
isCompound = true;
return Compiler.Binary.Operator.BitwiseOr;
case ExpressionType.OrElse:
return Compiler.Binary.Operator.LogicalOr;
case ExpressionType.RightShift:
return Compiler.Binary.Operator.RightShift;
case ExpressionType.RightShiftAssign:
isCompound = true;
return Compiler.Binary.Operator.RightShift;
case ExpressionType.Subtract:
return Compiler.Binary.Operator.Subtraction;
case ExpressionType.SubtractAssign:
isCompound = true;
return Compiler.Binary.Operator.Subtraction;
default:
throw new NotImplementedException (Operation.ToString ());
}
}
public override DynamicMetaObject FallbackBinaryOperation (DynamicMetaObject target, DynamicMetaObject arg, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var left = ctx.CreateCompilerExpression (argumentInfo [0], target);
var right = ctx.CreateCompilerExpression (argumentInfo [1], arg);
bool is_compound;
var oper = GetOperator (out is_compound);
Compiler.Expression expr;
if (is_compound) {
var target_expr = new Compiler.RuntimeValueExpression (target, ctx.ImportType (target.LimitType));
expr = new Compiler.CompoundAssign (oper, target_expr, right, left);
} else {
expr = new Compiler.Binary (oper, left, right);
}
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
if ((flags & CSharpBinderFlags.CheckedContext) != 0)
expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (arg);
return binder.Bind (ctx, context);
}
}
}
@@ -0,0 +1,128 @@
//
// CSharpBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Linq.Expressions;
using Compiler = Mono.CSharp;
using System.Reflection;
using System.Collections.Generic;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpBinder
{
static ConstructorInfo binder_exception_ctor;
static object resolver = new object ();
DynamicMetaObjectBinder binder;
Compiler.Expression expr;
BindingRestrictions restrictions;
DynamicMetaObject errorSuggestion;
public CSharpBinder (DynamicMetaObjectBinder binder, Compiler.Expression expr, DynamicMetaObject errorSuggestion)
{
this.binder = binder;
this.expr = expr;
this.restrictions = BindingRestrictions.Empty;
this.errorSuggestion = errorSuggestion;
}
public Compiler.ResolveContext.Options ResolveOptions { get; set; }
public void AddRestrictions (DynamicMetaObject arg)
{
restrictions = restrictions.Merge (CreateRestrictionsOnTarget (arg));
}
public void AddRestrictions (DynamicMetaObject[] args)
{
restrictions = restrictions.Merge (CreateRestrictionsOnTarget (args));
}
public DynamicMetaObject Bind (DynamicContext ctx, Type callingType)
{
Expression res;
try {
var rc = new Compiler.ResolveContext (new RuntimeBinderContext (ctx, callingType), ResolveOptions);
// Static typemanager and internal caches are not thread-safe
lock (resolver) {
expr = expr.Resolve (rc, Compiler.ResolveFlags.VariableOrValue);
}
if (expr == null)
throw new RuntimeBinderInternalCompilerException ("Expression resolved to null");
res = expr.MakeExpression (new Compiler.BuilderContext ());
} catch (RuntimeBinderException e) {
if (errorSuggestion != null)
return errorSuggestion;
res = CreateBinderException (e.Message);
} catch (Exception) {
if (errorSuggestion != null)
return errorSuggestion;
throw;
}
return new DynamicMetaObject (res, restrictions);
}
Expression CreateBinderException (string message)
{
if (binder_exception_ctor == null)
binder_exception_ctor = typeof (RuntimeBinderException).GetConstructor (new[] { typeof (string) });
//
// Uses target type to keep expressions composition working
//
return Expression.Throw (Expression.New (binder_exception_ctor, Expression.Constant (message)), binder.ReturnType);
}
static BindingRestrictions CreateRestrictionsOnTarget (DynamicMetaObject arg)
{
return arg.HasValue && arg.Value == null ?
BindingRestrictions.GetInstanceRestriction (arg.Expression, null) :
BindingRestrictions.GetTypeRestriction (arg.Expression, arg.LimitType);
}
public static BindingRestrictions CreateRestrictionsOnTarget (DynamicMetaObject[] args)
{
if (args.Length == 0)
return BindingRestrictions.Empty;
var res = CreateRestrictionsOnTarget (args[0]);
for (int i = 1; i < args.Length; ++i)
res = res.Merge (CreateRestrictionsOnTarget (args[i]));
return res;
}
}
}
@@ -0,0 +1,47 @@
//
// CSharpBinderFlags.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Microsoft.CSharp.RuntimeBinder
{
[Flags]
public enum CSharpBinderFlags
{
None = 0,
CheckedContext = 1,
InvokeSimpleName = 1 << 1,
InvokeSpecialName = 1 << 2,
BinaryOperationLogical = 1 << 3,
ConvertExplicit = 1 << 4,
ConvertArrayIndex = 1 << 5,
ResultIndexed = 1 << 6,
ValueFromCompoundAssignment = 1 << 7,
ResultDiscarded = 1 << 8
}
}
@@ -0,0 +1,68 @@
//
// CSharpConvertBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpConvertBinder : ConvertBinder
{
readonly CSharpBinderFlags flags;
readonly Type context;
public CSharpConvertBinder (Type type, Type context, CSharpBinderFlags flags)
: base (type, (flags & CSharpBinderFlags.ConvertExplicit) != 0)
{
this.flags = flags;
this.context = context;
}
public override DynamicMetaObject FallbackConvert (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (null, target);
if (Explicit)
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (Type), Compiler.Location.Null), expr, Compiler.Location.Null);
else
expr = new Compiler.ImplicitCast (expr, ctx.ImportType (Type), (flags & CSharpBinderFlags.ConvertArrayIndex) != 0);
if ((flags & CSharpBinderFlags.CheckedContext) != 0)
expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
return binder.Bind (ctx, context);
}
}
}
@@ -0,0 +1,71 @@
//
// CSharpGetIndexBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpGetIndexBinder : GetIndexBinder
{
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
public CSharpGetIndexBinder (Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (CSharpArgumentInfo.CreateCallInfo (argumentInfo, 1))
{
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject FallbackGetIndex (DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject errorSuggestion)
{
if (argumentInfo.Count != indexes.Length + 1) {
if (errorSuggestion == null)
throw new NotImplementedException ();
return errorSuggestion;
}
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
var args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
expr = new Compiler.ElementAccess (expr, args, Compiler.Location.Null);
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (indexes);
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,63 @@
//
// CSharpGetMemberBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpGetMemberBinder : GetMemberBinder
{
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
public CSharpGetMemberBinder (string name, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (name, false)
{
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject FallbackGetMember (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
expr = new Compiler.MemberAccess (expr, Name);
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,70 @@
//
// CSharpInvokeBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpInvokeBinder : InvokeBinder
{
readonly CSharpBinderFlags flags;
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
public CSharpInvokeBinder (CSharpBinderFlags flags, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (CSharpArgumentInfo.CreateCallInfo (argumentInfo, 1))
{
this.flags = flags;
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject FallbackInvoke (DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
expr = new Compiler.Invocation (expr, c_args);
if ((flags & CSharpBinderFlags.ResultDiscarded) == 0)
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
else
expr = new Compiler.DynamicResultCast (ctx.ImportType (ReturnType), expr);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (args);
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,73 @@
//
// CSharpInvokeConstructorBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpInvokeConstructorBinder : DynamicMetaObjectBinder
{
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
Type target_return_type;
public CSharpInvokeConstructorBinder (Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
{
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject Bind (DynamicMetaObject target, DynamicMetaObject[] args)
{
var ctx = DynamicContext.Create ();
var type = ctx.CreateCompilerExpression (argumentInfo [0], target);
target_return_type = type.Type.GetMetaInfo ();
var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
var binder = new CSharpBinder (
this, new Compiler.New (type, c_args, Compiler.Location.Null), null);
binder.AddRestrictions (target);
binder.AddRestrictions (args);
return binder.Bind (ctx, callingContext);
}
public override Type ReturnType {
get {
return target_return_type;
}
}
}
}
@@ -0,0 +1,194 @@
//
// CSharpInvokeMemberBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
using SLE = System.Linq.Expressions;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpInvokeMemberBinder : InvokeMemberBinder
{
//
// A custom runtime invocation is needed to deal with member invocation which
// is not real member invocation but invocation on invocalble member.
//
// An example:
// class C {
// dynamic f;
// void Foo ()
// {
// dynamic d = new C ();
// d.f.M ();
// }
//
// The runtime value of `f' can be a delegate in which case we are invoking result
// of member invocation, this is already handled by DoResolveDynamic but we need
// more runtime dependencies which require Microsoft.CSharp assembly reference or
// a lot of reflection calls
//
class Invocation : Compiler.Invocation
{
sealed class RuntimeDynamicInvocation : Compiler.ShimExpression
{
Invocation invoke;
public RuntimeDynamicInvocation (Invocation invoke, Compiler.Expression memberExpr)
: base (memberExpr)
{
this.invoke = invoke;
}
protected override Compiler.Expression DoResolve (Compiler.ResolveContext rc)
{
type = expr.Type;
eclass = Compiler.ExprClass.Value;
return this;
}
//
// Creates an invoke call on invocable expression
//
public override System.Linq.Expressions.Expression MakeExpression (Compiler.BuilderContext ctx)
{
var invokeBinder = invoke.invokeBinder;
var binder = Binder.Invoke (invokeBinder.flags, invokeBinder.callingContext, invokeBinder.argumentInfo);
var args = invoke.Arguments;
var args_expr = new SLE.Expression[invokeBinder.argumentInfo.Count];
var types = new Type [args_expr.Length + 2];
// Required by MakeDynamic
types[0] = typeof (System.Runtime.CompilerServices.CallSite);
types[1] = expr.Type.GetMetaInfo ();
args_expr[0] = expr.MakeExpression (ctx);
for (int i = 0; i < args.Count; ++i) {
args_expr[i + 1] = args[i].Expr.MakeExpression (ctx);
int type_index = i + 2;
types[type_index] = args[i].Type.GetMetaInfo ();
if (args[i].IsByRef)
types[type_index] = types[type_index].MakeByRefType ();
}
// Return type goes last
bool void_result = (invokeBinder.flags & CSharpBinderFlags.ResultDiscarded) != 0;
types[types.Length - 1] = void_result ? typeof (void) : invokeBinder.ReturnType;
//
// Much easier to use Expression.Dynamic cannot be used because it ignores ByRef arguments
// and it always generates either Func or Action and any value type argument is lost
//
Type delegateType = SLE.Expression.GetDelegateType (types);
return SLE.Expression.MakeDynamic (delegateType, binder, args_expr);
}
}
readonly CSharpInvokeMemberBinder invokeBinder;
public Invocation (Compiler.Expression expr, Compiler.Arguments arguments, CSharpInvokeMemberBinder invokeBinder)
: base (expr, arguments)
{
this.invokeBinder = invokeBinder;
}
protected override Compiler.Expression DoResolveDynamic (Compiler.ResolveContext ec, Compiler.Expression memberExpr)
{
return new RuntimeDynamicInvocation (this, memberExpr).Resolve (ec);
}
}
readonly CSharpBinderFlags flags;
IList<CSharpArgumentInfo> argumentInfo;
IList<Type> typeArguments;
Type callingContext;
public CSharpInvokeMemberBinder (CSharpBinderFlags flags, string name, Type callingContext, IEnumerable<Type> typeArguments, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (name, false, CSharpArgumentInfo.CreateCallInfo (argumentInfo, 1))
{
this.flags = flags;
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
this.typeArguments = typeArguments.ToReadOnly ();
}
public override DynamicMetaObject FallbackInvoke (DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
{
var b = new CSharpInvokeBinder (flags, callingContext, argumentInfo);
// TODO: Is errorSuggestion ever used?
return b.Defer (target, args);
}
public override DynamicMetaObject FallbackInvokeMember (DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
var t_args = typeArguments == null ?
null :
new Compiler.TypeArguments (typeArguments.Select (l => new Compiler.TypeExpression (ctx.ImportType (l), Compiler.Location.Null)).ToArray ());
var expr = ctx.CreateCompilerExpression (argumentInfo[0], target);
//
// Simple name invocation is actually member access invocation
// to capture original this argument. This brings problem when
// simple name is resolved as a static invocation and member access
// has to be reduced back to simple name without reporting an error
//
if ((flags & CSharpBinderFlags.InvokeSimpleName) != 0) {
var value = expr as Compiler.RuntimeValueExpression;
if (value != null)
value.IsSuggestionOnly = true;
}
expr = new Compiler.MemberAccess (expr, Name, t_args, Compiler.Location.Null);
expr = new Invocation (expr, c_args, this);
if ((flags & CSharpBinderFlags.ResultDiscarded) == 0)
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
else
expr = new Compiler.DynamicResultCast (ctx.ImportType (ReturnType), expr);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (args);
if ((flags & CSharpBinderFlags.InvokeSpecialName) != 0)
binder.ResolveOptions |= Compiler.ResolveContext.Options.InvokeSpecialName;
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,71 @@
//
// CSharpIsEventBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpIsEventBinder : DynamicMetaObjectBinder
{
Type callingContext;
string name;
public CSharpIsEventBinder (string name, Type callingContext)
{
this.name = name;
this.callingContext = callingContext;
}
public override DynamicMetaObject Bind (DynamicMetaObject target, DynamicMetaObject[] args)
{
var ctx = DynamicContext.Create ();
var context_type = ctx.ImportType (callingContext);
var queried_type = ctx.ImportType (target.LimitType);
var rc = new Compiler.ResolveContext (new RuntimeBinderContext (ctx, context_type), 0);
var expr = Compiler.Expression.MemberLookup (rc, false, queried_type,
name, 0, Compiler.Expression.MemberLookupRestrictions.ExactArity, Compiler.Location.Null);
var binder = new CSharpBinder (
this, new Compiler.BoolConstant (ctx.CompilerContext.BuiltinTypes, expr is Compiler.EventExpr, Compiler.Location.Null), null);
binder.AddRestrictions (target);
return binder.Bind (ctx, callingContext);
}
public override Type ReturnType {
get {
return typeof (bool);
}
}
}
}
@@ -0,0 +1,86 @@
//
// CSharpSetIndexBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpSetIndexBinder : SetIndexBinder
{
readonly CSharpBinderFlags flags;
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
public CSharpSetIndexBinder (CSharpBinderFlags flags, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (CSharpArgumentInfo.CreateCallInfo (argumentInfo, 2))
{
this.flags = flags;
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject FallbackSetIndex (DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
{
if (argumentInfo.Count != indexes.Length + 2) {
if (errorSuggestion == null)
throw new NotImplementedException ();
return errorSuggestion;
}
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
var args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
expr = new Compiler.ElementAccess (expr, args, Compiler.Location.Null);
var source = ctx.CreateCompilerExpression (argumentInfo [indexes.Length + 1], value);
// Same conversion as in SetMemberBinder
if ((flags & CSharpBinderFlags.ValueFromCompoundAssignment) != 0) {
expr = new Compiler.RuntimeExplicitAssign (expr, source);
} else {
expr = new Compiler.SimpleAssign (expr, source);
}
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
if ((flags & CSharpBinderFlags.CheckedContext) != 0)
expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (value);
binder.AddRestrictions (indexes);
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,82 @@
//
// CSharpSetMemberBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpSetMemberBinder : SetMemberBinder
{
readonly CSharpBinderFlags flags;
IList<CSharpArgumentInfo> argumentInfo;
Type callingContext;
public CSharpSetMemberBinder (CSharpBinderFlags flags, string name, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (name, false)
{
this.flags = flags;
this.callingContext = callingContext;
this.argumentInfo = argumentInfo.ToReadOnly ();
}
public override DynamicMetaObject FallbackSetMember (DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var source = ctx.CreateCompilerExpression (argumentInfo [1], value);
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
// Field assignment
expr = new Compiler.MemberAccess (expr, Name);
// Compound assignment under dynamic context does not convert result
// expression but when setting member type we need to do explicit
// conversion to ensure type match between member type and dynamic
// expression type
if ((flags & CSharpBinderFlags.ValueFromCompoundAssignment) != 0) {
expr = new Compiler.RuntimeExplicitAssign (expr, source);
} else {
expr = new Compiler.SimpleAssign (expr, source);
}
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
if ((flags & CSharpBinderFlags.CheckedContext) != 0)
expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (value);
return binder.Bind (ctx, callingContext);
}
}
}
@@ -0,0 +1,101 @@
//
// CSharpUnaryOperationBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class CSharpUnaryOperationBinder : UnaryOperationBinder
{
IList<CSharpArgumentInfo> argumentInfo;
readonly CSharpBinderFlags flags;
readonly Type context;
public CSharpUnaryOperationBinder (ExpressionType operation, CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
: base (operation)
{
this.argumentInfo = argumentInfo.ToReadOnly ();
if (this.argumentInfo.Count != 1)
throw new ArgumentException ("Unary operation requires 1 argument");
this.flags = flags;
this.context = context;
}
Compiler.Unary.Operator GetOperator ()
{
switch (Operation) {
case ExpressionType.Negate:
return Compiler.Unary.Operator.UnaryNegation;
case ExpressionType.Not:
return Compiler.Unary.Operator.LogicalNot;
case ExpressionType.OnesComplement:
return Compiler.Unary.Operator.OnesComplement;
case ExpressionType.UnaryPlus:
return Compiler.Unary.Operator.UnaryPlus;
default:
throw new NotImplementedException (Operation.ToString ());
}
}
public override DynamicMetaObject FallbackUnaryOperation (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
{
var ctx = DynamicContext.Create ();
var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
if (Operation == ExpressionType.IsTrue) {
expr = new Compiler.BooleanExpression (expr);
} else if (Operation == ExpressionType.IsFalse) {
expr = new Compiler.BooleanExpressionFalse (expr);
} else {
if (Operation == ExpressionType.Increment)
expr = new Compiler.UnaryMutator (Compiler.UnaryMutator.Mode.PreIncrement, expr, Compiler.Location.Null);
else if (Operation == ExpressionType.Decrement)
expr = new Compiler.UnaryMutator (Compiler.UnaryMutator.Mode.PreDecrement, expr, Compiler.Location.Null);
else
expr = new Compiler.Unary (GetOperator (), expr, Compiler.Location.Null);
expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
if ((flags & CSharpBinderFlags.CheckedContext) != 0)
expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
}
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
return binder.Bind (ctx, context);
}
}
}
@@ -0,0 +1,192 @@
//
// DynamicContext.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using Compiler = Mono.CSharp;
using System.Reflection;
using System.Collections.Generic;
namespace Microsoft.CSharp.RuntimeBinder
{
class DynamicContext
{
static DynamicContext dc;
static object compiler_initializer = new object ();
static object lock_object = new object ();
readonly Compiler.ModuleContainer module;
readonly Compiler.ReflectionImporter importer;
private DynamicContext (Compiler.ModuleContainer module, Compiler.ReflectionImporter importer)
{
this.module = module;
this.importer = importer;
}
public Compiler.CompilerContext CompilerContext {
get {
return module.Compiler;
}
}
public Compiler.ModuleContainer Module {
get {
return module;
}
}
public static DynamicContext Create ()
{
if (dc != null)
return dc;
lock (compiler_initializer) {
if (dc != null)
return dc;
var settings = new Compiler.CompilerSettings () {
WarningLevel = 0
};
var cc = new Compiler.CompilerContext (settings, ErrorPrinter.Instance) {
IsRuntimeBinder = true
};
//
// Any later loaded assemblies are handled internally by GetAssemblyDefinition
// domain.AssemblyLoad cannot be used as that would be too destructive as we
// would hold all loaded assemblies even if they can be never visited
//
// TODO: Remove this code and rely on GetAssemblyDefinition only
//
var module = new Compiler.ModuleContainer (cc);
module.HasTypesFullyDefined = true;
// Setup fake assembly, it's used mostly to simplify checks like friend-access
var temp = new Compiler.AssemblyDefinitionDynamic (module, "dynamic");
module.SetDeclaringAssembly (temp);
var importer = new Compiler.ReflectionImporter (module, cc.BuiltinTypes) {
IgnorePrivateMembers = false
};
// Import all currently loaded assemblies
// TODO: Rewrite this to populate type cache on-demand, that should greatly
// reduce our start-up cost
var domain = AppDomain.CurrentDomain;
foreach (var a in AppDomain.CurrentDomain.GetAssemblies ()) {
importer.ImportAssembly (a, module.GlobalRootNamespace);
}
cc.BuiltinTypes.CheckDefinitions (module);
module.InitializePredefinedTypes ();
dc = new DynamicContext (module, importer);
}
return dc;
}
//
// Creates mcs expression from dynamic object
//
public Compiler.Expression CreateCompilerExpression (CSharpArgumentInfo info, DynamicMetaObject value)
{
//
// No type details provider, go with runtime type
//
if (info == null) {
if (value.LimitType == typeof (object))
return new Compiler.NullLiteral (Compiler.Location.Null);
return new Compiler.RuntimeValueExpression (value, ImportType (value.RuntimeType));
}
//
// Value is known to be a type
//
if ((info.Flags & CSharpArgumentInfoFlags.IsStaticType) != 0)
return new Compiler.TypeExpression (ImportType ((Type) value.Value), Compiler.Location.Null);
if (value.Value == null &&
(info.Flags & (CSharpArgumentInfoFlags.IsOut | CSharpArgumentInfoFlags.IsRef | CSharpArgumentInfoFlags.UseCompileTimeType)) == 0 &&
value.LimitType == typeof (object)) {
return new Compiler.NullLiteral (Compiler.Location.Null);
}
//
// Use compilation time type when type was known not to be dynamic during compilation
//
Type value_type = (info.Flags & CSharpArgumentInfoFlags.UseCompileTimeType) != 0 ? value.Expression.Type : value.LimitType;
var type = ImportType (value_type);
if ((info.Flags & CSharpArgumentInfoFlags.Constant) != 0) {
var c = Compiler.Constant.CreateConstantFromValue (type, value.Value, Compiler.Location.Null);
//
// It can be null for misused Constant flag
//
if (c != null)
return c;
}
return new Compiler.RuntimeValueExpression (value, type);
}
//
// Creates mcs arguments from dynamic argument info
//
public Compiler.Arguments CreateCompilerArguments (IEnumerable<CSharpArgumentInfo> info, DynamicMetaObject[] args)
{
var res = new Compiler.Arguments (args.Length);
int pos = 0;
// enumerates over args
foreach (var item in info) {
var expr = CreateCompilerExpression (item, args[pos++]);
if (item.IsNamed) {
res.Add (new Compiler.NamedArgument (item.Name, Compiler.Location.Null, expr, item.ArgumentModifier));
} else {
res.Add (new Compiler.Argument (expr, item.ArgumentModifier));
}
if (pos == args.Length)
break;
}
return res;
}
public Compiler.TypeSpec ImportType (Type type)
{
lock (lock_object) {
return importer.ImportType (type);
}
}
}
}
@@ -0,0 +1,60 @@
//
// ErrorPrinter.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
class ErrorPrinter : Compiler.ReportPrinter
{
public static readonly ErrorPrinter Instance = new ErrorPrinter ();
private ErrorPrinter ()
{
}
public override bool HasRelatedSymbolSupport {
get {
return false;
}
}
public override void Print (Compiler.AbstractMessage msg, bool showFullPath)
{
string text;
if (msg.Code == 214) {
text = "Pointers and fixed size buffers cannot be used in a dynamic context";
} else {
text = msg.Text;
}
throw new RuntimeBinderException (text);
}
}
}
@@ -0,0 +1,45 @@
//
// CSharpInvokeMemberBinder.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Microsoft.CSharp.RuntimeBinder
{
static class Extensions
{
public static IList<T> ToReadOnly<T> (this IEnumerable<T> col)
{
return col == null ?
null : new ReadOnlyCollectionBuilder<T> (col);
}
}
}
@@ -0,0 +1,133 @@
//
// RuntimeBinderContext.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
using Compiler = Mono.CSharp;
namespace Microsoft.CSharp.RuntimeBinder
{
sealed class RuntimeBinderContext : Compiler.IMemberContext
{
readonly Compiler.ModuleContainer module;
readonly Type callingType;
readonly DynamicContext ctx;
Compiler.TypeSpec callingTypeImported;
public RuntimeBinderContext (DynamicContext ctx, Compiler.TypeSpec callingType)
{
this.ctx = ctx;
this.module = ctx.Module;
this.callingTypeImported = callingType;
}
public RuntimeBinderContext (DynamicContext ctx, Type callingType)
{
this.ctx = ctx;
this.module = ctx.Module;
this.callingType = callingType;
}
#region IMemberContext Members
public Compiler.TypeSpec CurrentType {
get {
//
// Delay importing of calling type to be compatible with .net
// Some libraries are setting it to null which is invalid
// but the NullReferenceException is thrown only when the context
// is used and not during initialization
//
if (callingTypeImported == null && callingType != null)
callingTypeImported = ctx.ImportType (callingType);
return callingTypeImported;
}
}
public Compiler.TypeParameters CurrentTypeParameters {
get { throw new NotImplementedException (); }
}
public Compiler.MemberCore CurrentMemberDefinition {
get {
return null;
}
}
public bool IsObsolete {
get {
// Always true to ignore obsolete attribute checks
return true;
}
}
public bool IsUnsafe {
get {
// Dynamic cannot be used with pointers
return false;
}
}
public bool IsStatic {
get {
throw new NotImplementedException ();
}
}
public Compiler.ModuleContainer Module {
get {
return module;
}
}
public string GetSignatureForError ()
{
throw new NotImplementedException ();
}
public Compiler.ExtensionMethodCandidates LookupExtensionMethod (string name, int arity)
{
// No extension method lookup in this context
return null;
}
public Compiler.FullNamedExpression LookupNamespaceOrType (string name, int arity, Mono.CSharp.LookupMode mode, Mono.CSharp.Location loc)
{
throw new NotImplementedException ();
}
public Compiler.FullNamedExpression LookupNamespaceAlias (string name)
{
// No namespace aliases in this context
return null;
}
#endregion
}
}
@@ -0,0 +1,56 @@
//
// RuntimeBinderException.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.Serialization;
namespace Microsoft.CSharp.RuntimeBinder
{
[Serializable]
public class RuntimeBinderException : Exception
{
public RuntimeBinderException ()
{
}
public RuntimeBinderException (string message)
: base (message)
{
}
public RuntimeBinderException (string message, Exception innerException)
: base (message, innerException)
{
}
protected RuntimeBinderException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
}
}
}
@@ -0,0 +1,56 @@
//
// RuntimeBinderInternalCompilerException.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.Serialization;
namespace Microsoft.CSharp.RuntimeBinder
{
[Serializable]
public class RuntimeBinderInternalCompilerException : Exception
{
public RuntimeBinderInternalCompilerException ()
{
}
public RuntimeBinderInternalCompilerException (string message)
: base (message)
{
}
public RuntimeBinderInternalCompilerException (string message, Exception innerException)
: base (message, innerException)
{
}
protected RuntimeBinderInternalCompilerException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
}
}
}
@@ -1,197 +1,23 @@
Assembly/AssemblyInfo.cs
../../build/common/SR.cs
../../build/common/Consts.cs
corefx/SR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Binder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfo.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpArgumentInfoFlags.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinaryOperationFlags.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpBinderFlags.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpCallFlags.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConversionKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpIsEventBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpUnaryOperationBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Error.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/CController.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/CError.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/CErrorFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/CParameterizedError.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFmt.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorHandling.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/IErrorSink.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/MessageID.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/UserStringBuilder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ICSharpInvokeOrInvokeMemberBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ResetBindException.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderController.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderException.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContextBase.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingContexts.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BindingFlag.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpArgInfo.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/BinOpSig.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/CandidateFunctionMember.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstVal.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ConstValFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/AggregateDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/Declaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/GlobalAttributeDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/NamespaceDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRFLAG.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FileRecord.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/FundamentalTypes.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GlobalSymbolContext.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinderResult.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/InputFile.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ITypeOrNamespace.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/LangCompiler.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookup.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MemberLookupResults.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MetadataToken.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodIterator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NameGenerator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/NullableLift.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Operators.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/OriginalExpressions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedAttributes.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/PredefinedMembers.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SemanticChecker.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/SubstitutionContext.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AssemblyQualifiedNamespaceSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LabelSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MiscSymFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceOrAggregateSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/NamespaceSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/ParentSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/PropertySymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Scope.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/Symbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolLoader.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolManagerBase.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolMask.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolTable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactoryBase.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TransparentIdentifierMemberSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/UnresolvedAggregateSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayLength.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Block.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BoundAnonymousFunction.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Call.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Cast.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ConditionalOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Event.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Field.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/FieldInfo.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/HoistedLocal.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/List.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodReference.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Return.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Statement.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Temporary.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/This.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeArguments.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOf.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/TypeOrNamespace.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnaryOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UnboundAnonymousFunction.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedConversion.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/UserDefinedLogicalOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ZeroInitialize.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/TypeBind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/AggregateType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArgumentListType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ArrayType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/BoundLambdaType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ErrorType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/MethodGroupType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullableType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/NullType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/OpenTypePlaceholderType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/ParameterModifierType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PredefinedTypes.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/Type.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeKind.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeParameterType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeTable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/VoidType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UnaOpSig.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/UtilityTypeExtensions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SpecialNames.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/KnownName.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Names.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/Operators.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedName.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/PredefinedType.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenFacts.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/TokenKind.cs
Microsoft.CSharp.RuntimeBinder/Binder.cs
Microsoft.CSharp.RuntimeBinder/CSharpArgumentInfo.cs
Microsoft.CSharp.RuntimeBinder/CSharpArgumentInfoFlags.cs
Microsoft.CSharp.RuntimeBinder/CSharpBinaryOperationBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpBinderFlags.cs
Microsoft.CSharp.RuntimeBinder/CSharpConvertBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpGetIndexBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpGetMemberBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpInvokeBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpInvokeConstructorBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpInvokeMemberBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpIsEventBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpSetIndexBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpSetMemberBinder.cs
Microsoft.CSharp.RuntimeBinder/CSharpUnaryOperationBinder.cs
Microsoft.CSharp.RuntimeBinder/DynamicContext.cs
Microsoft.CSharp.RuntimeBinder/Extensions.cs
Microsoft.CSharp.RuntimeBinder/RuntimeBinderContext.cs
Microsoft.CSharp.RuntimeBinder/RuntimeBinderException.cs
Microsoft.CSharp.RuntimeBinder/RuntimeBinderInternalCompilerException.cs
Microsoft.CSharp.RuntimeBinder/CSharpBinder.cs
Microsoft.CSharp.RuntimeBinder/ErrorPrinter.cs
-134
View File
@@ -1,134 +0,0 @@
//
// This file was generated by resx2sr tool
//
partial class SR
{
public const string InternalCompilerError = "An unexpected exception occurred while binding a dynamic operation";
public const string BindRequireArguments = "Cannot bind call with no calling object";
public const string BindCallFailedOverloadResolution = "Overload resolution failed";
public const string BindBinaryOperatorRequireTwoArguments = "Binary operators must be invoked with two arguments";
public const string BindUnaryOperatorRequireOneArgument = "Unary operators must be invoked with one argument";
public const string BindPropertyFailedMethodGroup = "The name '{0}' is bound to a method and cannot be used like a property";
public const string BindPropertyFailedEvent = "The event '{0}' can only appear on the left hand side of +";
public const string BindInvokeFailedNonDelegate = "Cannot invoke a non-delegate type";
public const string BindImplicitConversionRequireOneArgument = "Implicit conversion takes exactly one argument";
public const string BindExplicitConversionRequireOneArgument = "Explicit conversion takes exactly one argument";
public const string BindBinaryAssignmentRequireTwoArguments = "Binary operators cannot be invoked with one argument";
public const string BindBinaryAssignmentFailedNullReference = "Cannot perform member assignment on a null reference";
public const string NullReferenceOnMemberException = "Cannot perform runtime binding on a null reference";
public const string BindCallToConditionalMethod = "Cannot dynamically invoke method '{0}' because it has a Conditional attribute";
public const string BindToVoidMethodButExpectResult = "Cannot implicitly convert type 'void' to 'object'";
public const string BadBinaryOps = "Operator '{0}' cannot be applied to operands of type '{1}' and '{2}'";
public const string IntDivByZero = "Division by constant zero";
public const string BadIndexLHS = "Cannot apply indexing with [] to an expression of type '{0}'";
public const string BadIndexCount = "Wrong number of indices inside []; expected '{0}'";
public const string BadUnaryOp = "Operator '{0}' cannot be applied to operand of type '{1}'";
public const string NoImplicitConv = "Cannot implicitly convert type '{0}' to '{1}'";
public const string NoExplicitConv = "Cannot convert type '{0}' to '{1}'";
public const string ConstOutOfRange = "Constant value '{0}' cannot be converted to a '{1}'";
public const string AmbigBinaryOps = "Operator '{0}' is ambiguous on operands of type '{1}' and '{2}'";
public const string AmbigUnaryOp = "Operator '{0}' is ambiguous on an operand of type '{1}'";
public const string ValueCantBeNull = "Cannot convert null to '{0}' because it is a non-nullable value type";
public const string WrongNestedThis = "Cannot access a non-static member of outer type '{0}' via nested type '{1}'";
public const string NoSuchMember = "'{0}' does not contain a definition for '{1}'";
public const string ObjectRequired = "An object reference is required for the non-static field, method, or property '{0}'";
public const string AmbigCall = "The call is ambiguous between the following methods or properties: '{0}' and '{1}'";
public const string BadAccess = "'{0}' is inaccessible due to its protection level";
public const string MethDelegateMismatch = "No overload for '{0}' matches delegate '{1}'";
public const string AssgLvalueExpected = "The left-hand side of an assignment must be a variable, property or indexer";
public const string NoConstructors = "The type '{0}' has no constructors defined";
public const string BadDelegateConstructor = "The delegate '{0}' does not have a valid constructor";
public const string PropertyLacksGet = "The property or indexer '{0}' cannot be used in this context because it lacks the get accessor";
public const string ObjectProhibited = "Member '{0}' cannot be accessed with an instance reference; qualify it with a type name instead";
public const string AssgReadonly = "A readonly field cannot be assigned to (except in a constructor or a variable initializer)";
public const string RefReadonly = "A readonly field cannot be passed ref or out (except in a constructor)";
public const string AssgReadonlyStatic = "A static readonly field cannot be assigned to (except in a static constructor or a variable initializer)";
public const string RefReadonlyStatic = "A static readonly field cannot be passed ref or out (except in a static constructor)";
public const string AssgReadonlyProp = "Property or indexer '{0}' cannot be assigned to -- it is read only";
public const string AbstractBaseCall = "Cannot call an abstract base member: '{0}'";
public const string RefProperty = "A property or indexer may not be passed as an out or ref parameter";
public const string ManagedAddr = "Cannot take the address of, get the size of, or declare a pointer to a managed type ('{0}')";
public const string FixedNotNeeded = "You cannot use the fixed statement to take the address of an already fixed expression";
public const string UnsafeNeeded = "Dynamic calls cannot be used in conjunction with pointers";
public const string BadBoolOp = "In order to be applicable as a short circuit operator a user-defined logical operator ('{0}') must have the same return type as the type of its 2 parameters";
public const string MustHaveOpTF = "The type ('{0}') must contain declarations of operator true and operator false";
public const string CheckedOverflow = "The operation overflows at compile time in checked mode";
public const string ConstOutOfRangeChecked = "Constant value '{0}' cannot be converted to a '{1}' (use 'unchecked' syntax to override)";
public const string AmbigMember = "Ambiguity between '{0}' and '{1}'";
public const string SizeofUnsafe = "'{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf)";
public const string FieldInitRefNonstatic = "A field initializer cannot reference the non-static field, method, or property '{0}'";
public const string CallingFinalizeDepracated = "Destructors and object.Finalize cannot be called directly. Consider calling IDisposable.Dispose if available.";
public const string CallingBaseFinalizeDeprecated = "Do not directly call your base class Finalize method. It is called automatically from your destructor.";
public const string BadCastInFixed = "The right hand side of a fixed statement assignment may not be a cast expression";
public const string NoImplicitConvCast = "Cannot implicitly convert type '{0}' to '{1}'. An explicit conversion exists (are you missing a cast?)";
public const string InaccessibleGetter = "The property or indexer '{0}' cannot be used in this context because the get accessor is inaccessible";
public const string InaccessibleSetter = "The property or indexer '{0}' cannot be used in this context because the set accessor is inaccessible";
public const string BadArity = "Using the generic {1} '{0}' requires '{2}' type arguments";
public const string BadTypeArgument = "The type '{0}' may not be used as a type argument";
public const string TypeArgsNotAllowed = "The {1} '{0}' cannot be used with type arguments";
public const string HasNoTypeVars = "The non-generic {1} '{0}' cannot be used with type arguments";
public const string NewConstraintNotSatisfied = "'{2}' must be a non-abstract type with a public parameterless constructor in order to use it as parameter '{1}' in the generic type or method '{0}'";
public const string GenericConstraintNotSatisfiedRefType = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no implicit reference conversion from '{3}' to '{1}'.";
public const string GenericConstraintNotSatisfiedNullableEnum = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'.";
public const string GenericConstraintNotSatisfiedNullableInterface = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. The nullable type '{3}' does not satisfy the constraint of '{1}'. Nullable types can not satisfy any interface constraints.";
public const string GenericConstraintNotSatisfiedTyVar = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no boxing conversion or type parameter conversion from '{3}' to '{1}'.";
public const string GenericConstraintNotSatisfiedValType = "The type '{3}' cannot be used as type parameter '{2}' in the generic type or method '{0}'. There is no boxing conversion from '{3}' to '{1}'.";
public const string TypeVarCantBeNull = "Cannot convert null to type parameter '{0}' because it could be a non-nullable value type. Consider using 'default({0})' instead.";
public const string BadRetType = "'{1} {0}' has the wrong return type";
public const string CantInferMethTypeArgs = "The type arguments for method '{0}' cannot be inferred from the usage. Try specifying the type arguments explicitly.";
public const string MethGrpToNonDel = "Cannot convert method group '{0}' to non-delegate type '{1}'. Did you intend to invoke the method?";
public const string RefConstraintNotSatisfied = "The type '{2}' must be a reference type in order to use it as parameter '{1}' in the generic type or method '{0}'";
public const string ValConstraintNotSatisfied = "The type '{2}' must be a non-nullable value type in order to use it as parameter '{1}' in the generic type or method '{0}'";
public const string CircularConstraint = "Circular constraint dependency involving '{0}' and '{1}'";
public const string BaseConstraintConflict = "Type parameter '{0}' inherits conflicting constraints '{1}' and '{2}'";
public const string ConWithValCon = "Type parameter '{1}' has the 'struct' constraint so '{1}' cannot be used as a constraint for '{0}'";
public const string AmbigUDConv = "Ambiguous user defined conversions '{0}' and '{1}' when converting from '{2}' to '{3}'";
public const string PredefinedTypeNotFound = "Predefined type '{0}' is not defined or imported";
public const string PredefinedTypeBadType = "Predefined type '{0}' is declared incorrectly";
public const string BindToBogus = "'{0}' is not supported by the language";
public const string CantCallSpecialMethod = "'{0}': cannot explicitly call operator or accessor";
public const string BogusType = "'{0}' is a type not supported by the language";
public const string MissingPredefinedMember = "Missing compiler required member '{0}.{1}'";
public const string LiteralDoubleCast = "Literal of type double cannot be implicitly converted to type '{1}'; use an '{0}' suffix to create a literal of this type";
public const string UnifyingInterfaceInstantiations = "'{0}' cannot implement both '{1}' and '{2}' because they may unify for some type parameter substitutions";
public const string ConvertToStaticClass = "Cannot convert to static type '{0}'";
public const string GenericArgIsStaticClass = "'{0}': static types cannot be used as type arguments";
public const string PartialMethodToDelegate = "Cannot create delegate from method '{0}' because it is a partial method without an implementing declaration";
public const string IncrementLvalueExpected = "The operand of an increment or decrement operator must be a variable, property or indexer";
public const string NoSuchMemberOrExtension = "'{0}' does not contain a definition for '{1}' and no extension method '{1}' accepting a first argument of type '{0}' could be found (are you missing a using directive or an assembly reference?)";
public const string ValueTypeExtDelegate = "Extension methods '{0}' defined on value type '{1}' cannot be used to create delegates";
public const string BadArgCount = "No overload for method '{0}' takes '{1}' arguments";
public const string BadArgTypes = "The best overloaded method match for '{0}' has some invalid arguments";
public const string BadArgType = "Argument '{0}': cannot convert from '{1}' to '{2}'";
public const string RefLvalueExpected = "A ref or out argument must be an assignable variable";
public const string BadProtectedAccess = "Cannot access protected member '{0}' via a qualifier of type '{1}'; the qualifier must be of type '{2}' (or derived from it)";
public const string BindToBogusProp2 = "Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor methods '{1}' or '{2}'";
public const string BindToBogusProp1 = "Property, indexer, or event '{0}' is not supported by the language; try directly calling accessor method '{1}'";
public const string BadDelArgCount = "Delegate '{0}' does not take '{1}' arguments";
public const string BadDelArgTypes = "Delegate '{0}' has some invalid arguments";
public const string AssgReadonlyLocal = "Cannot assign to '{0}' because it is read-only";
public const string RefReadonlyLocal = "Cannot pass '{0}' as a ref or out argument because it is read-only";
public const string ReturnNotLValue = "Cannot modify the return value of '{0}' because it is not a variable";
public const string BadArgExtraRef = "Argument '{0}' should not be passed with the '{1}' keyword";
public const string BadArgRef = "Argument '{0}' must be passed with the '{1}' keyword";
public const string AssgReadonly2 = "Members of readonly field '{0}' cannot be modified (except in a constructor or a variable initializer)";
public const string RefReadonly2 = "Members of readonly field '{0}' cannot be passed ref or out (except in a constructor)";
public const string AssgReadonlyStatic2 = "Fields of static readonly field '{0}' cannot be assigned to (except in a static constructor or a variable initializer)";
public const string RefReadonlyStatic2 = "Fields of static readonly field '{0}' cannot be passed ref or out (except in a static constructor)";
public const string AssgReadonlyLocalCause = "Cannot assign to '{0}' because it is a '{1}'";
public const string RefReadonlyLocalCause = "Cannot pass '{0}' as a ref or out argument because it is a '{1}'";
public const string ThisStructNotInAnonMeth = "Anonymous methods, lambda expressions, and query expressions inside structs cannot access instance members of 'this'. Consider copying 'this' to a local variable outside the anonymous method, lambda expression or query expression and using the local instead.";
public const string DelegateOnNullable = "Cannot bind delegate to '{0}' because it is a member of 'System.Nullable<T>'";
public const string BadCtorArgCount = "'{0}' does not contain a constructor that takes '{1}' arguments";
public const string BadExtensionArgTypes = "'{0}' does not contain a definition for '{1}' and the best extension method overload '{2}' has some invalid arguments";
public const string BadInstanceArgType = "Instance argument: cannot convert from '{0}' to '{1}'";
public const string BadArgTypesForCollectionAdd = "The best overloaded Add method '{0}' for the collection initializer has some invalid arguments";
public const string InitializerAddHasParamModifiers = "The best overloaded method match '{0}' for the collection initializer element cannot be used. Collection initializer 'Add' methods cannot have ref or out parameters.";
public const string NonInvocableMemberCalled = "Non-invocable member '{0}' cannot be used like a method.";
public const string NamedArgumentSpecificationBeforeFixedArgument = "Named argument specifications must appear after all fixed arguments have been specified";
public const string BadNamedArgument = "The best overload for '{0}' does not have a parameter named '{1}'";
public const string BadNamedArgumentForDelegateInvoke = "The delegate '{0}' does not have a parameter named '{1}'";
public const string DuplicateNamedArgument = "Named argument '{0}' cannot be specified multiple times";
public const string NamedArgumentUsedInPositional = "Named argument '{0}' specifies a parameter for which a positional argument has already been given";
}
@@ -106,7 +106,6 @@
<Compile Include="..\..\mcs\typespec.cs" />
<Compile Include="..\..\mcs\visit.cs" />
<Compile Include="..\..\tools\monop\outline.cs" />
<Compile Include="aot.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -1,5 +1,3 @@
Assembly/AssemblyInfo.cs
aot.cs
../../mcs/anonymous.cs
../../mcs/argument.cs
../../mcs/assign.cs
@@ -57,3 +55,4 @@ aot.cs
../../build/common/Consts.cs
../../tools/monop/outline.cs
../../mcs/cs-parser.cs
Assembly/AssemblyInfo.cs
-105
View File
@@ -1,105 +0,0 @@
//
// aot.cs: AOT System.Reflection.Emit extensions to simplify mcs compilation
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if FULL_AOT_RUNTIME
namespace System.Reflection.Emit
{
static class AssemblyBuilderExtensions
{
public static void AddResourceFile (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static ModuleBuilder DefineDynamicModule (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static void DefineVersionInfoResource (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static void DefineUnmanagedResource (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static void Save (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static void SetEntryPoint (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
static class ConstructorBuilderExtensions
{
public static void AddDeclarativeSecurity (this ConstructorBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
static class MethodBuilderExtensions
{
public static void AddDeclarativeSecurity (this MethodBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
static class ModuleBuilderExtensions
{
public static void DefineManifestResource (this ModuleBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
static class TypeBuilderExtensions
{
public static void AddDeclarativeSecurity (this TypeBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public static Type CreateType (this TypeBuilder builder)
{
throw new NotSupportedException ();
}
}
}
#endif
+824
View File
@@ -0,0 +1,824 @@
//
// monotouch.cs: iOS System.Reflection.Emit API needed to simplify mcs compilation
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Reflection.Emit
{
public class TypeBuilder : Type
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of Type
public override Type GetInterface (string name, bool ignoreCase)
{
throw new NotSupportedException ();
}
public override Type[] GetInterfaces ()
{
throw new NotSupportedException ();
}
public override Type GetElementType ()
{
throw new NotSupportedException ();
}
public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override EventInfo[] GetEvents (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override FieldInfo GetField (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override FieldInfo[] GetFields (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override Type GetNestedType (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override Type[] GetNestedTypes (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
protected override TypeAttributes GetAttributeFlagsImpl ()
{
throw new NotSupportedException ();
}
protected override bool HasElementTypeImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsArrayImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsByRefImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsCOMObjectImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsPointerImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsPrimitiveImpl ()
{
throw new NotSupportedException ();
}
public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters)
{
throw new NotSupportedException ();
}
public override Assembly Assembly {
get {
throw new NotSupportedException ();
}
}
public override string AssemblyQualifiedName {
get {
throw new NotSupportedException ();
}
}
public override Type BaseType {
get {
throw new NotSupportedException ();
}
}
public override string FullName {
get {
throw new NotSupportedException ();
}
}
public override Guid GUID {
get {
throw new NotSupportedException ();
}
}
public override Module Module {
get {
throw new NotSupportedException ();
}
}
public override string Namespace {
get {
throw new NotSupportedException ();
}
}
public override Type UnderlyingSystemType {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddInterfaceImplementation (Type interfaceType)
{
throw new NotSupportedException ();
}
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public void SetParent (object arg)
{
throw new NotSupportedException ();
}
public Type CreateType()
{
throw new NotSupportedException ();
}
public ConstructorBuilder DefineConstructor (params object[] args)
{
throw new NotSupportedException ();
}
public MethodBuilder DefineMethod (params object[] args)
{
throw new NotSupportedException ();
}
public TypeBuilder DefineNestedType (params object[] args)
{
throw new NotSupportedException ();
}
public PropertyBuilder DefineProperty (params object[] args)
{
throw new NotSupportedException ();
}
public EventBuilder DefineEvent (params object[] args)
{
throw new NotSupportedException ();
}
public FieldBuilder DefineField (params object[] args)
{
throw new NotSupportedException ();
}
public GenericTypeParameterBuilder[] DefineGenericParameters (params string[] names)
{
throw new NotSupportedException ();
}
public MethodBuilder DefineMethodOverride (params object[] args)
{
throw new NotSupportedException ();
}
public static ConstructorInfo GetConstructor (Type type, ConstructorInfo constructor)
{
throw new NotSupportedException ();
}
public static FieldInfo GetField (Type type, FieldInfo field)
{
throw new NotSupportedException ();
}
public static MethodInfo GetMethod (Type type, MethodInfo method)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class MethodBuilder : MethodBase
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override MemberTypes MemberType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of MethodBase
public override MethodImplAttributes GetMethodImplementationFlags ()
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetParameters ()
{
throw new NotSupportedException ();
}
public override object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override RuntimeMethodHandle MethodHandle {
get {
throw new NotSupportedException ();
}
}
public override MethodAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public ParameterBuilder DefineParameter (params object[] args)
{
throw new NotSupportedException ();
}
public GenericTypeParameterBuilder[] DefineGenericParameters (params string[] names)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public ILGenerator GetILGenerator ()
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
public void SetImplementationFlags (MethodImplAttributes attributes)
{
throw new NotSupportedException ();
}
public void SetParameters (params Type[] parameterTypes)
{
throw new NotSupportedException ();
}
public void SetReturnType (object arg)
{
throw new NotSupportedException ();
}
}
public class AssemblyBuilder : Assembly
{
public void AddResourceFile (params object[] args)
{
throw new NotSupportedException ();
}
public void DefineVersionInfoResource (params object[] args)
{
throw new NotSupportedException ();
}
public ModuleBuilder DefineDynamicModule (params object[] args)
{
throw new NotSupportedException ();
}
public void DefineUnmanagedResource (params object[] args)
{
throw new NotSupportedException ();
}
public void Save (params object[] args)
{
throw new NotSupportedException ();
}
public void SetEntryPoint (params object[] args)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class ConstructorBuilder : MethodBase
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override MemberTypes MemberType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of MethodBase
public override MethodImplAttributes GetMethodImplementationFlags ()
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetParameters ()
{
throw new NotSupportedException ();
}
public override object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override RuntimeMethodHandle MethodHandle {
get {
throw new NotSupportedException ();
}
}
public override MethodAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public ParameterBuilder DefineParameter (params object[] args)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public ILGenerator GetILGenerator ()
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
public void SetImplementationFlags (MethodImplAttributes attributes)
{
throw new NotSupportedException ();
}
}
public class ModuleBuilder : Module
{
public void DefineManifestResource (params object[] args)
{
throw new NotSupportedException ();
}
public TypeBuilder DefineType (params object[] args)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public MethodInfo GetArrayMethod (params object[] args)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class PropertyBuilder : PropertyInfo
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of PropertyInfo
public override MethodInfo[] GetAccessors (bool nonPublic)
{
throw new NotSupportedException ();
}
public override MethodInfo GetGetMethod (bool nonPublic)
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetIndexParameters ()
{
throw new NotSupportedException ();
}
public override MethodInfo GetSetMethod (bool nonPublic)
{
throw new NotSupportedException ();
}
public override object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override PropertyAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
public override bool CanRead {
get {
throw new NotSupportedException ();
}
}
public override bool CanWrite {
get {
throw new NotSupportedException ();
}
}
public override Type PropertyType {
get {
throw new NotSupportedException ();
}
}
#endregion
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public void SetGetMethod (object arg)
{
throw new NotSupportedException ();
}
public void SetSetMethod (object arg)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class FieldBuilder : FieldInfo
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of FieldInfo
public override object GetValue (object obj)
{
throw new NotSupportedException ();
}
public override void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override FieldAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
public override RuntimeFieldHandle FieldHandle {
get {
throw new NotSupportedException ();
}
}
public override Type FieldType {
get {
throw new NotSupportedException ();
}
}
#endregion
public void SetConstant (object arg)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class EventBuilder
{
public void SetAddOnMethod (MethodBuilder mdBuilder)
{
throw new NotSupportedException ();
}
public void SetRemoveOnMethod (MethodBuilder mdBuilder)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
}
@@ -0,0 +1 @@
#include testing_aot_full_Mono.CSharp.dll.sources
@@ -0,0 +1 @@
#include testing_aot_full_Mono.CSharp.dll.sources
Loaded 100 of 1613 files, more files were not shown because too many files have changed in this diff. Show more