mono.git
7 years agoBuild mono runtime under none desktop Windows API family, adjustments and cleanup.
lateralusX [Fri, 28 Oct 2016 13:24:53 +0000 (15:24 +0200)]
Build mono runtime under none desktop Windows API family, adjustments and cleanup.

Continuation work on previous none desktop Windows API family PR's adjusting all
changes to similar patterns used over previous PR's. This PR also move the logic
to silence a MS VS linker warning on empty source files into a macro. It also includes
the use of the macro in a couple of more source files causing linker warnings when build
on none desktop API families excluding JIT support.

Since other Windows API family work is still in progress it also disables build capabilities
for none desktop API families.

7 years agoMerge pull request #3912 from akoeplinger/marshal-ptrtostrbstr
Marek Safar [Tue, 8 Nov 2016 07:55:14 +0000 (08:55 +0100)]
Merge pull request #3912 from akoeplinger/marshal-ptrtostrbstr

[corlib] Expose Marshal.PtrToStringBSTR on mobile

7 years agoMerge pull request #3902 from henricm/fix-rename-lpstr-utf8
Marek Safar [Tue, 8 Nov 2016 07:50:50 +0000 (08:50 +0100)]
Merge pull request #3902 from henricm/fix-rename-lpstr-utf8

Rename fix for lpstr to utf8str on Windows

7 years ago[corlib] Expose Marshal.PtrToStringBSTR on mobile
Alexander Köplinger [Tue, 8 Nov 2016 00:31:30 +0000 (01:31 +0100)]
[corlib] Expose Marshal.PtrToStringBSTR on mobile

The SecureStringHelper from referencesource I added in https://github.com/mono/mono/pull/3887
relies on this to convert from SecureString to plaintext.

It failed on mobile because we always throw a NotImplementedException there,
but we actually have an implementation on the runtime side (even in the DISABLE_COM case).

7 years ago[runtime] Fix the ios build.
Zoltan Varga [Mon, 7 Nov 2016 22:37:50 +0000 (17:37 -0500)]
[runtime] Fix the ios build.

7 years ago[jit] Really fix the DISABLE_JIT build.
Zoltan Varga [Mon, 7 Nov 2016 20:48:05 +0000 (15:48 -0500)]
[jit] Really fix the DISABLE_JIT build.

7 years agoMerge pull request #3896 from lambdageek/bug-46250
Aleksey Kliger (λgeek) [Mon, 7 Nov 2016 20:18:08 +0000 (15:18 -0500)]
Merge pull request #3896 from lambdageek/bug-46250

[runtime] Ensure generic type definition arity matches generic context arity

7 years ago[threadpool] Fix hang on domain unloading (#3904)
Ludovic Henry [Mon, 7 Nov 2016 20:11:22 +0000 (15:11 -0500)]
[threadpool] Fix hang on domain unloading (#3904)

Because we wouldn't return the correct ThreadPoolDomain for the requested domain, we would simply wait on the last inserted MonoDomain. This would lead to a hang when unloading the domain, as we wouldn't wait on the correct domain.

7 years agoFix tarball build
Alexander Köplinger [Mon, 7 Nov 2016 19:36:24 +0000 (20:36 +0100)]
Fix tarball build

7 years ago[BTLS]: Use `int64_t` instead of `long` in the native API. (#3857)
Martin Baulig [Mon, 7 Nov 2016 17:23:42 +0000 (18:23 +0100)]
[BTLS]: Use `int64_t` instead of `long` in the native API. (#3857)

* [BTLS]: Use `int64_t` instead of `long` in the native API.

* Copy time64.c from Android's source code to get a 64-bit timegm64().

* Rename into btls_timegm64() and remove everything we don't need.

(cherry picked from commit 2365067bdae39f75979df30b65ae08f095cbd176)

7 years agoMerge pull request #3894 from akoeplinger/fix-actor
Alexander Köplinger [Mon, 7 Nov 2016 17:24:14 +0000 (18:24 +0100)]
Merge pull request #3894 from akoeplinger/fix-actor

[System.ServiceModel] Recognize 'faultactor' in SOAP fault message

7 years ago[jit] Fix the DISABLE_JIT build.
Zoltan Varga [Mon, 7 Nov 2016 16:37:59 +0000 (11:37 -0500)]
[jit] Fix the DISABLE_JIT build.

7 years agoMerge pull request #2408 from tastywheattasteslikechicken/MoreInterfaceSupport
Rodrigo Kumpera [Mon, 7 Nov 2016 16:04:29 +0000 (08:04 -0800)]
Merge pull request #2408 from tastywheattasteslikechicken/MoreInterfaceSupport

Enhance maximum number of supported interfaces from 2^16.

7 years agoMerge pull request #3903 from ntherning/fix-NRE-in-Win32-IpcChannel.StopListening...
Niklas Therning [Mon, 7 Nov 2016 14:04:54 +0000 (15:04 +0100)]
Merge pull request #3903 from ntherning/fix-NRE-in-Win32-IpcChannel.StopListening-when-no-server-started

Fix NRE in Win32 IpcChannel.StopListening() when no server started

7 years agoMerge pull request #3901 from ntherning/Process_GetModules_internal-crash-on-windows
Niklas Therning [Mon, 7 Nov 2016 14:01:39 +0000 (15:01 +0100)]
Merge pull request #3901 from ntherning/Process_GetModules_internal-crash-on-windows

Fix crash in Process.GetModules_internal() on Windows after refactorings

7 years agoFix NRE in Win32 IpcChannel.StopListening() when no server started
Niklas Therning [Mon, 7 Nov 2016 14:00:05 +0000 (15:00 +0100)]
Fix NRE in Win32 IpcChannel.StopListening() when no server started

This makes the System.Runtime.Remoting test suite fail in various places on
Windows due to the TestFixtureTearDown method in BaseCalls throwing an NRE.

7 years agoRename fix for lpstr to utf8str on Windows
Henric Müller [Mon, 7 Nov 2016 13:46:21 +0000 (14:46 +0100)]
Rename fix for lpstr to utf8str on Windows

PR https://github.com/mono/mono/pull/3776 renamed `mono_string_to_lpstr`
to `mono_string_to_utf8str` without updating the Windows version.
This fix renames `mono_string_to_lpstr` to `mono_string_to_utf8str` to
make sure the string is allocated using `CoTaskMemAlloc` on Windows
since it will be freed using `CoTaskMemFree`.

7 years agoFix crash in Process.GetModules_internal() on Windows after refactorings
Niklas Therning [Mon, 7 Nov 2016 11:01:43 +0000 (12:01 +0100)]
Fix crash in Process.GetModules_internal() on Windows after refactorings

EnumProcessModules() is called incorrectly. Also fixes a missing curly braces
pair.

7 years agoMerge pull request #3900 from monojenkins/update-csprojs
Alexander Köplinger [Mon, 7 Nov 2016 01:29:55 +0000 (02:29 +0100)]
Merge pull request #3900 from monojenkins/update-csprojs

[msvc] Update csproj files

7 years ago[runtime] Move field.first and method.first to MonoClassDef. Add accessor functions...
Zoltan Varga [Sun, 6 Nov 2016 17:34:45 +0000 (12:34 -0500)]
[runtime] Move field.first and method.first to MonoClassDef. Add accessor functions for them. (#3898)

7 years ago[msvc] Update csproj files
monojenkins [Sun, 6 Nov 2016 04:20:14 +0000 (04:20 +0000)]
[msvc] Update csproj files

7 years ago[arm64] Set a flag in MonoContext if the fp regs are saved, and only restore them...
Zoltan Varga [Sat, 5 Nov 2016 02:19:25 +0000 (22:19 -0400)]
[arm64] Set a flag in MonoContext if the fp regs are saved, and only restore them if they are. These registers are not saved when the context is created from a ucontext. (#3890)

7 years ago[mkbundle] Don't free bundled dylibrary directory (#3897)
Aleksey Kliger (λgeek) [Sat, 5 Nov 2016 01:02:23 +0000 (21:02 -0400)]
[mkbundle] Don't free bundled dylibrary directory (#3897)

mkdtemp modifies the template in-place, don't free it.

7 years agoMerge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile
Rodrigo Kumpera [Fri, 4 Nov 2016 21:59:47 +0000 (14:59 -0700)]
Merge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile

MemoryMappedFile support on Windows

7 years ago[mcs] Consider method candidates with misplaced named arguments not applicable. Fixes...
Marek Safar [Fri, 4 Nov 2016 17:34:24 +0000 (18:34 +0100)]
[mcs] Consider method candidates with misplaced named arguments not applicable. Fixes #46190

7 years ago[mcs] Remove debug check
Marek Safar [Fri, 4 Nov 2016 17:33:44 +0000 (18:33 +0100)]
[mcs] Remove debug check

7 years ago[runtime] Add a few mono mono_class_is_... accessors. (#3891)
Zoltan Varga [Fri, 4 Nov 2016 16:34:13 +0000 (12:34 -0400)]
[runtime] Add a few mono mono_class_is_... accessors. (#3891)

7 years ago[System.ServiceModel] Recognize 'faultactor' in SOAP fault message
Alexander Köplinger [Fri, 4 Nov 2016 14:59:18 +0000 (15:59 +0100)]
[System.ServiceModel] Recognize 'faultactor' in SOAP fault message

It's an optional element according to [1] and we were simply
throwing a NotImplementedException when encountering it.

Fixed by reading the element value instead. I noticed that we
had a 'details' variable that was never assigned, so the check
for `details == null` was always true and can be removed.
This makes inlining the body of the CreateFault() call easier
since we no longer need to choose different overloads and makes
the code consistent with the CreateFault12 method.
Also added a better exception in case of an unrecognized element.

The CreateFault12 method (handles SOAP 1.2) does not need a similar
fix since actor is not an element in that version [2].

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

[1] https://www.w3.org/TR/soap11/#_Toc478383507
[2] https://www.w3.org/TR/soap12/#soapfault

7 years ago[runtime] Ensure generic type definition arity matches generic context arity
Aleksey Kliger [Thu, 3 Nov 2016 21:07:19 +0000 (17:07 -0400)]
[runtime] Ensure generic type definition arity matches generic context arity

Don't instantiate generic type definitions (like Dictionary`2) with too few or too many
type arguments.

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

7 years ago[tests] Test System.Type.GetType() on generics with wrong arity.
Aleksey Kliger [Thu, 3 Nov 2016 21:05:53 +0000 (17:05 -0400)]
[tests] Test System.Type.GetType() on generics with wrong arity.

7 years ago[mcs] More work on debug scopes declared out of order. Fixes #45774
Marek Safar [Fri, 4 Nov 2016 15:03:52 +0000 (16:03 +0100)]
[mcs] More work on debug scopes declared out of order. Fixes #45774

7 years ago[os-event] Fix set operation
Ludovic Henry [Fri, 4 Nov 2016 14:43:44 +0000 (10:43 -0400)]
[os-event] Fix set operation

This is a logic bug where we would only wake up one of the threads that are waiting for the manual MonoOSEvent to be set. This would be a problem only if more than one thread is waiting.

7 years ago[threads] Use MonoOSEvent for Thread.Suspend/Resume (#3881)
Ludovic Henry [Fri, 4 Nov 2016 13:41:52 +0000 (09:41 -0400)]
[threads] Use MonoOSEvent for Thread.Suspend/Resume (#3881)

* [threads] Refactor how we create Thread and InternalThread in native

* [threads] Add coop support for async call

* [threads] Use MonoOSEvent for Thread.Suspend/Resume

By using a MonoOSEvent we avoid relying on the utils/threads suspend mechanism to suspend a metadata/threads. This reduce coupling between both mechanism, and that would allow us to remove a bunch of code from utils/threads when switching to coop.

This only works with coop suspend, as we need the ability to return from an async call, and that's not possible with preemptive suspend.

7 years ago[tests] Remove # to enable tests
Ludovic Henry [Fri, 4 Nov 2016 13:20:39 +0000 (09:20 -0400)]
[tests] Remove # to enable tests

Make would consider the files following the first # to be comments, leading to not passing it to the test-runner.

7 years agoMerge pull request #3893 from henricm/fix-class-accessor-vsproj
Alexander Köplinger [Fri, 4 Nov 2016 13:04:43 +0000 (14:04 +0100)]
Merge pull request #3893 from henricm/fix-class-accessor-vsproj

Adding class-accessors.c to VS project

7 years agoMerge pull request #3887 from akoeplinger/networkcredential-securestring
Alexander Köplinger [Fri, 4 Nov 2016 12:53:06 +0000 (13:53 +0100)]
Merge pull request #3887 from akoeplinger/networkcredential-securestring

[System] Replace NetworkCredential with referencesource

7 years agoAdding class-accessors.c to VS project
Henric Müller [Fri, 4 Nov 2016 12:50:41 +0000 (13:50 +0100)]
Adding class-accessors.c to VS project

7 years agoMerge pull request #3892 from monojenkins/update-csprojs
Marek Safar [Fri, 4 Nov 2016 08:04:21 +0000 (09:04 +0100)]
Merge pull request #3892 from monojenkins/update-csprojs

[msvc] Update csproj files

7 years ago[msvc] Update csproj files
monojenkins [Fri, 4 Nov 2016 04:31:11 +0000 (04:31 +0000)]
[msvc] Update csproj files

7 years ago[jit] Cleanup the usage of DISABLE_JIT a bit so it encompasses the whole mini-codegen...
Zoltan Varga [Fri, 4 Nov 2016 01:43:15 +0000 (21:43 -0400)]
[jit] Cleanup the usage of DISABLE_JIT a bit so it encompasses the whole mini-codegen.c file, add DISABLE_JIT to mini-llvm.c. (#3888)

7 years ago[runtime] Revert parts of 016709fe52e921416322982f8185925f83de5866 which seems to...
Zoltan Varga [Fri, 4 Nov 2016 01:30:28 +0000 (21:30 -0400)]
[runtime] Revert parts of 016709fe52e921416322982f8185925f83de5866 which seems to cause races until they can be fixed. (#3889)

7 years ago[System] Replace NetworkCredential with referencesource
Alexander Köplinger [Thu, 3 Nov 2016 21:57:20 +0000 (22:57 +0100)]
[System] Replace NetworkCredential with referencesource

Fixes an issue where the Mono implementation wasn't converting
between the SecureString and the plaintext version of the password.

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

7 years agoFix a warning.
Zoltan Varga [Thu, 3 Nov 2016 21:50:40 +0000 (17:50 -0400)]
Fix a warning.

7 years ago[arm64] Save+restore fp regs from the context in the call filter trampoline, the...
Zoltan Varga [Thu, 3 Nov 2016 21:13:35 +0000 (17:13 -0400)]
[arm64] Save+restore fp regs from the context in the call filter trampoline, the JITted code doesn't use them, but if the called code throws an exception, the throw context for the inner throw needs to contain the same values as the original throw context. (#3877)

7 years agoMerge pull request #3871 from akoeplinger/mono.posix-windows
Alexander Köplinger [Thu, 3 Nov 2016 19:48:54 +0000 (20:48 +0100)]
Merge pull request #3871 from akoeplinger/mono.posix-windows

[Mono.Posix] Disable Unix-specific tests on Windows

7 years ago[corcompare] Update custom XI project file to embed cecil sources
Marek Safar [Thu, 3 Nov 2016 15:11:54 +0000 (16:11 +0100)]
[corcompare] Update custom XI project file to embed cecil sources

7 years ago[mono-api-html] Remove unused cecil reference
Marek Safar [Thu, 3 Nov 2016 15:10:39 +0000 (16:10 +0100)]
[mono-api-html] Remove unused cecil reference

7 years ago[mkbundle] Fix the argument order to put the entry point on argv[1] (#3879)
Miguel de Icaza [Thu, 3 Nov 2016 14:58:36 +0000 (10:58 -0400)]
[mkbundle] Fix the argument order to put the entry point on argv[1] (#3879)

7 years agoMerge pull request #3734 from kumpera/monoclass_reorg
Rodrigo Kumpera [Thu, 3 Nov 2016 13:24:59 +0000 (06:24 -0700)]
Merge pull request #3734 from kumpera/monoclass_reorg

First pass at MonoClass reorg

7 years agoRemove spurious slash.
Rodrigo Kumpera [Thu, 3 Nov 2016 13:24:43 +0000 (06:24 -0700)]
Remove spurious slash.

7 years ago[runtime] Fix the exception message to include the proper type name and calling assem...
Zoltan Varga [Thu, 3 Nov 2016 01:27:26 +0000 (21:27 -0400)]
[runtime] Fix the exception message to include the proper type name and calling assembly when Type.GetType () fails. Fix some warnings. (#3876)

7 years agoFix tarball
Alexander Köplinger [Wed, 2 Nov 2016 22:43:16 +0000 (23:43 +0100)]
Fix tarball

This file is now autogenerated.

7 years agoFix some warnings.
Zoltan Varga [Wed, 2 Nov 2016 21:14:07 +0000 (17:14 -0400)]
Fix some warnings.

7 years agoMerge pull request #3867 from kumpera/issues
Rodrigo Kumpera [Wed, 2 Nov 2016 21:02:29 +0000 (14:02 -0700)]
Merge pull request #3867 from kumpera/issues

Fix some issues found by cppcheck.

7 years agoFix some warnings.
Zoltan Varga [Wed, 2 Nov 2016 19:13:43 +0000 (15:13 -0400)]
Fix some warnings.

7 years ago[utils] More Mach ARM build fixes
Alexander Köplinger [Wed, 2 Nov 2016 18:41:56 +0000 (19:41 +0100)]
[utils] More Mach ARM build fixes

7 years ago[utils] Fix mono_mach_arch_thread_states_to_mcontext function declaration
Alexander Köplinger [Wed, 2 Nov 2016 17:53:51 +0000 (18:53 +0100)]
[utils] Fix mono_mach_arch_thread_states_to_mcontext function declaration

81b0032420fd6f1be3b24af69d393f9d10393133 missed updating it in mach-support-unknown.c

7 years ago[process] Fix OSX build
Ludovic Henry [Wed, 2 Nov 2016 17:31:15 +0000 (13:31 -0400)]
[process] Fix OSX build

7 years ago[io-layer] Extract Process runtime support (#3859)
Ludovic Henry [Wed, 2 Nov 2016 16:46:47 +0000 (12:46 -0400)]
[io-layer] Extract Process runtime support (#3859)

* [process] Separate code for unix and win32

* [process] Extract OpenProcess

* [process] Extract GetCurrentProcess

* [process] Extract GetModuleFileNameEx

* [process] Extract GetModuleBaseName

* [process] Extract EnumProcessModules

* [process] Extract GetModuleInformation

* [process] Extract CloseProcess

* [process] Extract ShellExecuteEx

* [process] Extract CreateProcessWithLogonW

* [process] Extract GetProcessId

* [process] Extract GetExitCodeProcess

* [process] Extract GetProcessWorkingSetSize and SetProcessWorkingSetSize

* [process] Extract GetPriorityClass and SetPriorityClass

* [process] Extract TerminateProcess

* [process] Extract GetProcessTimes

* [process] Extract CreateProcess

* [process] Extract wapi_process_set_cli_launcher

* [process] Extract wapi_process_get_path

* [process] Remove unused #define in processes.h

* [process] Extract _wapi_process_duplicate

* [process] Extract MonoW32HandleOps

* [process] Move the process related icalls to w32process

* [Process] Move platform specific code to dedicated files

* [process] Cleanup function names

* [io-layer] Remove dead code

* [process] Factor common unix and win32 code

* [process] Fix windows compilation

7 years ago[mcs] Remove unknown warnings reporting to match latest csc
Marek Safar [Wed, 2 Nov 2016 15:53:35 +0000 (16:53 +0100)]
[mcs] Remove unknown warnings reporting to match latest csc

7 years ago[sgen] Fix sgen with nursery sizes bigger than 4G
Vlad Brezae [Wed, 2 Nov 2016 15:21:30 +0000 (17:21 +0200)]
[sgen] Fix sgen with nursery sizes bigger than 4G

7 years agoMerge pull request #3863 from lambdageek/dev-42584-take4
Aleksey Kliger (λgeek) [Wed, 2 Nov 2016 15:17:55 +0000 (11:17 -0400)]
Merge pull request #3863 from lambdageek/dev-42584-take4

[custom-attrs] Add a low level iterator for custom attributes on assemblies

And use it to check for the reference assembly attribute.

Using the low level APIs means we don't trigger load of referenced
assemblies and we don't need to take locks, so it is safe to call this
during assembly loading.

Follow up work for https://bugzilla.xamarin.com/show_bug.cgi?id=42584

7 years agoMerge pull request #3870 from evincarofautumn/fix-xmm-scanning-mac-arm
Alexander Köplinger [Wed, 2 Nov 2016 14:55:55 +0000 (15:55 +0100)]
Merge pull request #3870 from evincarofautumn/fix-xmm-scanning-mac-arm

[runtime] Fix Mach ARM build.

7 years ago[Mono.Posix] Disable Unix-specific tests on Windows
Alexander Köplinger [Wed, 2 Nov 2016 11:18:59 +0000 (12:18 +0100)]
[Mono.Posix] Disable Unix-specific tests on Windows

They don't make sense there.

Added nunit group to win32.make for excluding, similar to darwin.make

7 years agoMerge pull request #3874 from henricm/isolated-file-stream-testscleanup
Alexander Köplinger [Wed, 2 Nov 2016 14:18:46 +0000 (15:18 +0100)]
Merge pull request #3874 from henricm/isolated-file-stream-testscleanup

Making sure opened streams are closed in IsolatedStorageFileStreamTests

7 years ago[bcl] Add back "dot-per-test" progress indicator to nunitlite
Alexander Köplinger [Wed, 2 Nov 2016 14:14:00 +0000 (15:14 +0100)]
[bcl] Add back "dot-per-test" progress indicator to nunitlite

The verbose mode can be enabled with TEST_HARNESS_VERBOSE=1 like before.
We now also print the full test name including namespace in verbose mode again.

7 years agoMaking sure opened streams are closed in IsolatedStorageFileStreamTests
Henric Müller [Wed, 2 Nov 2016 14:13:23 +0000 (15:13 +0100)]
Making sure opened streams are closed in IsolatedStorageFileStreamTests

7 years ago[build] MonoTouch specific build flags injection
Marek Safar [Wed, 2 Nov 2016 12:34:28 +0000 (13:34 +0100)]
[build] MonoTouch specific build flags injection

7 years agoMerge pull request #3869 from radical/mcs-ignore-arg
Marek Safar [Wed, 2 Nov 2016 08:04:44 +0000 (09:04 +0100)]
Merge pull request #3869 from radical/mcs-ignore-arg

[mcs] Accept and ignore command line args supported by csc that we don't

7 years ago[arm] Fix MONO_CONTEXT_GET_CURRENT (), the inline assembly block was using pre-increm...
Zoltan Varga [Wed, 2 Nov 2016 07:22:57 +0000 (03:22 -0400)]
[arm] Fix MONO_CONTEXT_GET_CURRENT (), the inline assembly block was using pre-increment addressing instead of post increment. (#3866)

7 years ago[runtime] Fix the build.
Zoltan Varga [Wed, 2 Nov 2016 04:23:36 +0000 (00:23 -0400)]
[runtime] Fix the build.

7 years ago[jit] Simplify the code generation for the mkrefany opcode, the same code can handle...
Zoltan Varga [Wed, 2 Nov 2016 02:15:38 +0000 (22:15 -0400)]
[jit] Simplify the code generation for the mkrefany opcode, the same code can handle the aot and non-aot case. The non-aot case was emitting OP_STOREP_MEMBASE_IMM opcodes with 64 bit immediates, and some platforms like arm64 couldn't handle that.

7 years ago[arm] Call the tls get trampoline through a GOT slot instead of directly, since a...
Zoltan Varga [Wed, 2 Nov 2016 02:05:54 +0000 (22:05 -0400)]
[arm] Call the tls get trampoline through a GOT slot instead of directly, since a direct call could go through the trampoline code which would fail if the thread is not attached to the runtime. Fixes #45371. (#3850)

7 years agoFix rebase issues.
Rodrigo Kumpera [Wed, 2 Nov 2016 00:48:44 +0000 (17:48 -0700)]
Fix rebase issues.

7 years ago[runtime] Fix Mach ARM build.
Jon Purdy [Wed, 2 Nov 2016 00:30:43 +0000 (17:30 -0700)]
[runtime] Fix Mach ARM build.

7 years agoRevert "[bcl] Compile nunit-lite-console using -d:MONO so it doesn't print the list...
Zoltan Varga [Wed, 2 Nov 2016 00:15:05 +0000 (20:15 -0400)]
Revert "[bcl] Compile nunit-lite-console using -d:MONO so it doesn't print the list of ignored tests. (#3865)"

This reverts commit cff2aab0d200c9233e12f7c34f9493e6f71e47a2.

Revert this as its not needed.

7 years ago[runtime] Introduce mono_class_is_interface.
Rodrigo Kumpera [Tue, 11 Oct 2016 23:31:56 +0000 (16:31 -0700)]
[runtime] Introduce mono_class_is_interface.

7 years ago[runtime] Introduce mono_class_is_abstract.
Rodrigo Kumpera [Tue, 11 Oct 2016 23:22:22 +0000 (16:22 -0700)]
[runtime] Introduce mono_class_is_abstract.

7 years agoFix copyright notices.
Rodrigo Kumpera [Tue, 11 Oct 2016 23:07:12 +0000 (16:07 -0700)]
Fix copyright notices.

7 years ago[runtime] Add counters for how many times ext, ref_info_handle and marshal_info are...
Rodrigo Kumpera [Tue, 11 Oct 2016 23:04:54 +0000 (16:04 -0700)]
[runtime] Add counters for how many times ext, ref_info_handle and marshal_info are set.

7 years ago[runtime] Move MonoClass::next_class_cache to MonoClassDef.
Rodrigo Kumpera [Tue, 11 Oct 2016 22:22:22 +0000 (15:22 -0700)]
[runtime] Move MonoClass::next_class_cache to MonoClassDef.

7 years ago[runtime] Add counters for the number of class kinds that are loaded.
Rodrigo Kumpera [Tue, 11 Oct 2016 22:16:18 +0000 (15:16 -0700)]
[runtime] Add counters for the number of class kinds that are loaded.

7 years ago[runtime] Move MonoClass::generic_container to MonoClassGtd.
Rodrigo Kumpera [Tue, 11 Oct 2016 02:53:37 +0000 (19:53 -0700)]
[runtime] Move MonoClass::generic_container to MonoClassGtd.

7 years ago[runtime] Move MonoClass::flags to MonoClassDef.
Rodrigo Kumpera [Fri, 7 Oct 2016 01:02:10 +0000 (18:02 -0700)]
[runtime] Move MonoClass::flags to MonoClassDef.

This flag is constant on most types. Now it's on the only place that actually has it as variable.

7 years ago[runtime] Move MonoClass::generic_class to MonoClassGenericInst.
Rodrigo Kumpera [Mon, 3 Oct 2016 16:57:43 +0000 (09:57 -0700)]
[runtime] Move MonoClass::generic_class to MonoClassGenericInst.

To make this possible, two accessor functions were added/augmented:

mono_class_get_generic_class: Gets the generic_class and aborts if the MonoClass is of the wrong kind.
mono_class_try_get_generic_class: Gets the generic_class or return NULL if the MonoClass is of the wrong kind.

The bulk of this change is converting all checks for generic_class into calls to mono_class_is_ginst.

7 years agoMerge pull request #3855 from akoeplinger/shacng-monodroid
Alexander Köplinger [Tue, 1 Nov 2016 23:52:37 +0000 (00:52 +0100)]
Merge pull request #3855 from akoeplinger/shacng-monodroid

[corlib] Map SHA*Cng algorithms to SHA*Managed on monodroid

7 years agoRemove exception when using SO_REUSEADDR on Linux (#3856)
Sylvan Clebsch [Tue, 1 Nov 2016 22:41:46 +0000 (22:41 +0000)]
Remove exception when using SO_REUSEADDR on Linux (#3856)

SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

https://github.com/zeromq/netmq/issues/623
https://github.com/zeromq/netmq/issues/592
https://github.com/fsprojects/IfSharp/issues/90

7 years ago[mcs] Accept and ignore command line args supported by csc that we don't
Ankit Jain [Tue, 1 Nov 2016 22:15:05 +0000 (18:15 -0400)]
[mcs] Accept and ignore command line args supported by csc that we don't

.. support:

/deterministic+
/deterministic-

7 years ago[custom attr] Iterate over methoddef custom attrs
Aleksey Kliger [Tue, 1 Nov 2016 21:34:09 +0000 (17:34 -0400)]
[custom attr] Iterate over methoddef custom attrs

Make mono_assembly_metadata_foreach_custom_attr iterate over
MethodDef custom attributes in addition to MemberRef.

7 years ago[loader] treat corlib same as other assemblies when checking ReferenceAssemblyAttribute
Aleksey Kliger [Tue, 1 Nov 2016 16:17:04 +0000 (12:17 -0400)]
[loader] treat corlib same as other assemblies when checking ReferenceAssemblyAttribute

Now that we're using a metadata-only ReferenceAssemblyAttribute check,
we can treat corlib the same as any other assembly - if we see
ReferenceAssemblyAttribute when loading a candidate assembly, skip it.

7 years ago[custom-attrs] Add low-level metadata iterator for assembly custom attributes
Aleksey Kliger [Mon, 31 Oct 2016 23:01:48 +0000 (19:01 -0400)]
[custom-attrs] Add low-level metadata iterator for assembly custom attributes

And use it to check for the reference assembly attribute.

Using the low level APIs means we don't trigger load of referenced
assemblies and we don't need to take locks, so it is safe to call this
during assembly loading.

7 years ago[runtime] Introduce specialized structs for each MonoClass kind.
Rodrigo Kumpera [Thu, 29 Sep 2016 23:44:17 +0000 (16:44 -0700)]
[runtime] Introduce specialized structs for each MonoClass kind.

7 years ago[runtime] Introduce kind test functions to cleanup things a bit.
Rodrigo Kumpera [Thu, 29 Sep 2016 23:07:51 +0000 (16:07 -0700)]
[runtime] Introduce kind test functions to cleanup things a bit.

Instead of doing

```
if (klass->class_kind == MONO_CLASS_GTD)
...
```

Now you do:

```
if (mono_class_is_gtd (klass))
...
```

7 years ago[runtime] Introduce MonoClass::class_kind and remove is_generic and is_inflated.
Rodrigo Kumpera [Thu, 29 Sep 2016 22:56:29 +0000 (15:56 -0700)]
[runtime] Introduce MonoClass::class_kind and remove is_generic and is_inflated.

7 years agoMerge pull request #3764 from evincarofautumn/fix-xmm-scanning-mac
Rodrigo Kumpera [Tue, 1 Nov 2016 19:03:00 +0000 (12:03 -0700)]
Merge pull request #3764 from evincarofautumn/fix-xmm-scanning-mac

[wip] [runtime] Fix scanning of SIMD registers on Mac.

7 years agoFix some issues found by cppcheck.
Rodrigo Kumpera [Tue, 1 Nov 2016 19:00:41 +0000 (12:00 -0700)]
Fix some issues found by cppcheck.

7 years ago[threads] Fix Posix async resume (#3861)
Ludovic Henry [Tue, 1 Nov 2016 18:45:47 +0000 (14:45 -0400)]
[threads] Fix Posix async resume (#3861)

If we fail to send the signal, we should not add a pending operation, as the signal handler is never going to answer this operation (via mono_threads_notify_initiator_of_resume).

7 years agoMerge pull request #3864 from monojenkins/update-csprojs
Marek Safar [Tue, 1 Nov 2016 09:20:37 +0000 (10:20 +0100)]
Merge pull request #3864 from monojenkins/update-csprojs

[msvc] Update csproj files

7 years ago[bcl] Compile nunit-lite-console using -d:MONO so it doesn't print the list of ignore...
Zoltan Varga [Tue, 1 Nov 2016 07:47:53 +0000 (03:47 -0400)]
[bcl] Compile nunit-lite-console using -d:MONO so it doesn't print the list of ignored tests. (#3865)

7 years ago[msvc] Update csproj files
monojenkins [Tue, 1 Nov 2016 04:24:32 +0000 (04:24 +0000)]
[msvc] Update csproj files