mono.git
8 years ago[runtime] Clean up configure.ac a bit.
Zoltan Varga [Sun, 2 Aug 2015 04:13:49 +0000 (00:13 -0400)]
[runtime] Clean up configure.ac a bit.

8 years ago[arm] Remove usunsed arch/arm/tramp.c file.
Zoltan Varga [Sun, 2 Aug 2015 03:27:35 +0000 (23:27 -0400)]
[arm] Remove usunsed arch/arm/tramp.c file.

8 years ago[arm] Avoid running out of thunk space if the same instruction is patched multiple...
Zoltan Varga [Sun, 2 Aug 2015 01:25:46 +0000 (21:25 -0400)]
[arm] Avoid running out of thunk space if the same instruction is patched multiple times. Fixes #32179.

8 years ago[aot] Avoid passing empty quoted arguments to the linker.
Zoltan Varga [Sun, 2 Aug 2015 00:42:37 +0000 (20:42 -0400)]
[aot] Avoid passing empty quoted arguments to the linker.

8 years agoFix a warning.
Zoltan Varga [Sat, 1 Aug 2015 23:45:14 +0000 (19:45 -0400)]
Fix a warning.

8 years ago[llvm] Fix support for returning empty structs from pinvoke methods on amd64.
Zoltan Varga [Sat, 1 Aug 2015 23:34:20 +0000 (19:34 -0400)]
[llvm] Fix support for returning empty structs from pinvoke methods on amd64.

8 years ago[jit] Enable direct calls to the monitor icalls.
Zoltan Varga [Sat, 1 Aug 2015 23:17:05 +0000 (19:17 -0400)]
[jit] Enable direct calls to the monitor icalls.

8 years ago[runtime] Use mono_set_pending_exception () in the monitor icalls.
Zoltan Varga [Sat, 1 Aug 2015 23:16:30 +0000 (19:16 -0400)]
[runtime] Use mono_set_pending_exception () in the monitor icalls.

8 years agoMerge pull request #1955 from LogosBible/servicepoint_nre
Marek Safar [Sat, 1 Aug 2015 06:52:31 +0000 (08:52 +0200)]
Merge pull request #1955 from LogosBible/servicepoint_nre

Fix NRE in CheckAvailableForRecycling. Fixes #32685

8 years agoMerge pull request #1956 from akoeplinger/fix-processtest-race
Marek Safar [Sat, 1 Aug 2015 05:50:47 +0000 (07:50 +0200)]
Merge pull request #1956 from akoeplinger/fix-processtest-race

[System] Fix a race in two ProcessTest tests

8 years agoMerge pull request #1957 from akoeplinger/msbuild-fix
Alex Rønne Petersen [Sat, 1 Aug 2015 04:35:38 +0000 (06:35 +0200)]
Merge pull request #1957 from akoeplinger/msbuild-fix

Revert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"

8 years agoRevert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"
Alexander Köplinger [Thu, 23 Jul 2015 09:52:06 +0000 (11:52 +0200)]
Revert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"

This reverts commit 51297ed7ab06480df84520c758639b6cef0790d9.

It caused a regression for escaped quotes (%22) in msbuild properties. See https://github.com/mono/mono/commit/51297ed7ab06480df84520c758639b6cef0790d9#commitcomment-11827605.

Disable test that now fails again after the revert. Add new test that verifies the behavior originally broken by the change.

8 years ago[System] Fix a race in two ProcessTest tests
Alexander Köplinger [Fri, 31 Jul 2015 23:33:04 +0000 (01:33 +0200)]
[System] Fix a race in two ProcessTest tests

The tests sometimes failed in CI, due to a race condition between
the Exited event and our assertion of whether it was called.

8 years agoFix NRE in CheckAvailableForRecycling. Fixes #32685
Tom Philpot [Fri, 31 Jul 2015 22:17:35 +0000 (15:17 -0700)]
Fix NRE in CheckAvailableForRecycling. Fixes #32685

8 years ago[mkbundle] Add `mkbundle --dos2unix` parameter.
Jonathan Pryor [Fri, 31 Jul 2015 19:21:57 +0000 (15:21 -0400)]
[mkbundle] Add `mkbundle --dos2unix` parameter.

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=25086
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=31875
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=32171

Reverts and reworks commit bcfec743.

The problem is that when Xamarin.Android is running mkbundle, dos2unix
should NEVER be used, because the Android NDK NEVER wants Unix-like
paths, which is what dos2unix creates.

Commit bcfec743 attempted to fix this by removing dos2unix invocation
from the Xamarin.Android codepath.

The problem is that the logic was backwards: it removed dos2unix
invocation when XAMARIN_ANDROID was NOT defined, and PRESERVED
dos2unix invocation when XAMARIN_ANDROID WAS defined.

Meaning commit bcfec743 broke normal/default mkbundle.exe use on
Windows -- it would no longer probe for and use dos2unix if present --
and Xamarin.Android use of mkbundle continued to check for and use
dos2unix if it was present, continuing the buggy behavior.

Doh!

Thus, a reworking: Add a `mkbundle --dos2unix` parameter.
If `mkbundle --dos2unix=false` is specified, dos2unix will NOT be
probed for, and will NOT be used. If `mkbundle --dos2unix` or
`mkbundle --dos2unix=true` is used, then dos2unix WILL be used.

This allows the caller to consistently, ahead of time, control
mkbundle's behavior regarding dos2unix, which will e.g. allow
Xamarin.Android to *always* specify --dos2unix=false, allowing things
to build as desired there.

8 years ago[System.Runtime.Remoting] Use NotWorking category for test instead of Ignore attribute
Alexander Köplinger [Fri, 31 Jul 2015 19:06:05 +0000 (21:06 +0200)]
[System.Runtime.Remoting] Use NotWorking category for test instead of Ignore attribute

The TestFixtureSetUp would sometimes fail in CI, but none of the tests in this class are
actually run since they are all either [Category("NotWorking")] or [Ignore].

Moving the one test from Ignore to NotWorking category allows NUnit to recognize there
are no tests to run and skips the unnecessary TestFixtureSetUp completely.

8 years ago[mcs] Try to report better error message for file excedding PE/COFF limit. Fixes...
Marek Safar [Fri, 31 Jul 2015 12:36:28 +0000 (14:36 +0200)]
[mcs] Try to report better error message for file excedding PE/COFF limit. Fixes #32487

8 years ago[runtime] Add 2.0 build assemblies to remapping table. Fixes #32561
Marek Safar [Fri, 31 Jul 2015 11:50:47 +0000 (13:50 +0200)]
[runtime] Add 2.0 build assemblies to remapping table. Fixes #32561

8 years ago[reflection] Filter out private accessors when queried from derived types. Fixes...
Marek Safar [Fri, 31 Jul 2015 07:33:17 +0000 (09:33 +0200)]
[reflection] Filter out private accessors when queried from derived types. Fixes #32609

8 years agoParallelize the generation of aot images for make fullaotcheck.
Zoltan Varga [Fri, 31 Jul 2015 02:45:30 +0000 (22:45 -0400)]
Parallelize the generation of aot images for make fullaotcheck.

8 years ago[aot] Fix the caching of runtime-invoke wrappers after the wrapper cache changes...
Zoltan Varga [Thu, 30 Jul 2015 21:24:19 +0000 (17:24 -0400)]
[aot] Fix the caching of runtime-invoke wrappers after the wrapper cache changes, two methods with the same signature might have different runtime invoke wrappers now, and the caching would break their lookup.

8 years ago[runtime] Support quoted assembly names. Fixes #32591
Marek Safar [Thu, 30 Jul 2015 17:15:56 +0000 (19:15 +0200)]
[runtime] Support quoted assembly names. Fixes #32591

8 years agoMerge pull request #1840 from ludovic-henry/iolayer-thread-interrupt
Rodrigo Kumpera [Thu, 30 Jul 2015 14:48:44 +0000 (10:48 -0400)]
Merge pull request #1840 from ludovic-henry/iolayer-thread-interrupt

[runtime] Implement wait interrupt in thread info, instead of in the io-layer

8 years ago[System]: Fix WebConnectionStream.SetHeadersAsync() logic for #31830.
Martin Baulig [Thu, 30 Jul 2015 13:28:28 +0000 (15:28 +0200)]
[System]: Fix WebConnectionStream.SetHeadersAsync() logic for #31830.

This fixes commits 8ccfe0f8ff71d18151f8aad90d0855dfd2d2a723 and
c109f9ca03d38e608cbd85cb2fdf8cfaf55bb97c.

Added new test:
https://github.com/xamarin/web-tests/commit/d60bc3f637ca2bf4aa1379b839d878e224d344c8

(cherry picked from commit c133880bc407baed5d46222e20677d1427b32b4d)

8 years agoAdd missing {
Neale Ferguson [Thu, 30 Jul 2015 11:09:37 +0000 (07:09 -0400)]
Add missing {

8 years ago[amd64] Allocate stack space for saving argument registers in the sdb trampoline...
Zoltan Varga [Thu, 30 Jul 2015 03:04:42 +0000 (23:04 -0400)]
[amd64] Allocate stack space for saving argument registers in the sdb trampoline code on winx64.

8 years ago[amd64] Allocate stack space for saving argument registers in the generic trampoline...
Zoltan Varga [Thu, 30 Jul 2015 02:43:05 +0000 (22:43 -0400)]
[amd64] Allocate stack space for saving argument registers in the generic trampoline code on winx64.

8 years ago[jit] Avoid emitting the DW_CFA_mono_advance_loc mono extension opcode into the ...
Zoltan Varga [Thu, 30 Jul 2015 02:29:10 +0000 (22:29 -0400)]
[jit] Avoid emitting the DW_CFA_mono_advance_loc mono extension opcode into the .debug_frame section.

8 years agoMerge pull request #1929 from BrzVlad/feature-unwind4yall
Vlad Brezae [Thu, 30 Jul 2015 02:08:18 +0000 (19:08 -0700)]
Merge pull request #1929 from BrzVlad/feature-unwind4yall

Feature trampoline unwind info

8 years ago[arm] Provide unwind info for tls thunks
Vlad Brezae [Wed, 15 Jul 2015 23:40:29 +0000 (23:40 +0000)]
[arm] Provide unwind info for tls thunks

We don't try to unwind from the fallback thunks since they call external code anyway.

8 years ago[arm] Simplify declaration of global symbols in asm
Vlad Brezae [Wed, 15 Jul 2015 22:43:09 +0000 (22:43 +0000)]
[arm] Simplify declaration of global symbols in asm

8 years ago[arm] Fix unwind info for managed methods
Vlad Brezae [Fri, 19 Jun 2015 00:55:46 +0000 (17:55 -0700)]
[arm] Fix unwind info for managed methods

Add unwind information for the epilog.

8 years ago[aot] Provide unwind info for plt trampolines
Vlad Brezae [Mon, 15 Jun 2015 23:23:18 +0000 (16:23 -0700)]
[aot] Provide unwind info for plt trampolines

8 years ago[arm] Add unwind info for trampolines
Vlad Brezae [Thu, 11 Jun 2015 00:58:25 +0000 (00:58 +0000)]
[arm] Add unwind info for trampolines

8 years ago[x86] Add unwind info for registered trampolines.
Vlad Brezae [Fri, 15 May 2015 22:57:15 +0000 (15:57 -0700)]
[x86] Add unwind info for registered trampolines.

8 years ago[amd64] Add unwind info for registered trampolines.
Vlad Brezae [Fri, 8 May 2015 23:23:56 +0000 (16:23 -0700)]
[amd64] Add unwind info for registered trampolines.

8 years agoRemove an obsolete comment.
Zoltan Varga [Wed, 29 Jul 2015 22:29:24 +0000 (18:29 -0400)]
Remove an obsolete comment.

8 years agoRevert "Report XDG Documents directory for SpecialFolder.MyDocuments"
Zoltan Varga [Wed, 29 Jul 2015 22:15:37 +0000 (18:15 -0400)]
Revert "Report XDG Documents directory for SpecialFolder.MyDocuments"

This reverts commit d6553bc988dd9f2a3c535c6075868f233ecd3302.

Revert this as it breaks the build.

8 years ago[runtime] Register tramp jit info to the corresponding domain
Vlad Brezae [Sat, 6 Jun 2015 01:13:04 +0000 (18:13 -0700)]
[runtime] Register tramp jit info to the corresponding domain

8 years ago[x86] Register throw trampolines
Vlad Brezae [Fri, 12 Jun 2015 00:45:45 +0000 (17:45 -0700)]
[x86] Register throw trampolines

8 years ago[runtime] Register unbox trampolines
Vlad Brezae [Tue, 2 Jun 2015 20:58:53 +0000 (13:58 -0700)]
[runtime] Register unbox trampolines

8 years ago[arm] Register and add unwind information for page trampolines.
Vlad Brezae [Fri, 10 Jul 2015 20:57:23 +0000 (13:57 -0700)]
[arm] Register and add unwind information for page trampolines.

8 years ago[runtime] Register imt trampolines
Vlad Brezae [Tue, 2 Jun 2015 19:04:38 +0000 (12:04 -0700)]
[runtime] Register imt trampolines

8 years ago[runtime] Register get gsharedvt arg trampolines
Vlad Brezae [Tue, 2 Jun 2015 19:02:47 +0000 (12:02 -0700)]
[runtime] Register get gsharedvt arg trampolines

8 years ago[runtime] Register static rgctx trampolines
Vlad Brezae [Tue, 2 Jun 2015 18:48:46 +0000 (11:48 -0700)]
[runtime] Register static rgctx trampolines

8 years ago[runtime] Register tramp infos for delegate invoke trampolines
Vlad Brezae [Tue, 12 May 2015 20:38:37 +0000 (13:38 -0700)]
[runtime] Register tramp infos for delegate invoke trampolines

Also refactor MonoTrampInfo creation, similar to the other trampolines.

8 years ago[x86] Fix usage of virtual delegate invoke tramps for aot
Vlad Brezae [Wed, 15 Jul 2015 01:59:43 +0000 (18:59 -0700)]
[x86] Fix usage of virtual delegate invoke tramps for aot

We need to fallback if the vtable slot exceedes the limit.

8 years ago[runtime] Fix lookup of aot symbol for imt delegate invoke tramps
Vlad Brezae [Wed, 15 Jul 2015 01:53:59 +0000 (18:53 -0700)]
[runtime] Fix lookup of aot symbol for imt delegate invoke tramps

Offset for calls through imt is negative

8 years ago[runtime] Add missing delegate invoke trampolines
Vlad Brezae [Wed, 15 Jul 2015 02:49:34 +0000 (19:49 -0700)]
[runtime] Add missing delegate invoke trampolines

8 years ago[amd64] Fix failure to emit imt delegate invoke tramps
Vlad Brezae [Wed, 15 Jul 2015 01:45:35 +0000 (18:45 -0700)]
[amd64] Fix failure to emit imt delegate invoke tramps

The problem was due to implicit casting of the dividend to unsigned (which overflows) when divided by unsigned.

8 years ago[aot] Register tramp infos when loading trampolines in aot.
Vlad Brezae [Thu, 9 Jul 2015 23:52:46 +0000 (16:52 -0700)]
[aot] Register tramp infos when loading trampolines in aot.

8 years ago[runtime] Expose trampoline jit infos that have unwind info to the runtime
Vlad Brezae [Wed, 29 Apr 2015 00:51:45 +0000 (17:51 -0700)]
[runtime] Expose trampoline jit infos that have unwind info to the runtime

Some trampolines cannot have typical unwind information because they don't get the return address from the stack. Others are called from native code that doesn't have a managed-to-native transition so unwind information would be pointless at this point. We don't include these in the jit info tables for now, not to confuse the runtime further more.

8 years ago[runtime] We already checked that the IP is within the clause
Vlad Brezae [Thu, 7 May 2015 22:08:44 +0000 (15:08 -0700)]
[runtime] We already checked that the IP is within the clause

8 years ago[jit] Add different frame type for trampoline frames.
Vlad Brezae [Fri, 24 Apr 2015 21:03:13 +0000 (14:03 -0700)]
[jit] Add different frame type for trampoline frames.

8 years ago[jit] Include the unwind_info into the tramp JitInfos
Vlad Brezae [Fri, 24 Apr 2015 19:02:47 +0000 (12:02 -0700)]
[jit] Include the unwind_info into the tramp JitInfos

8 years ago[llvm] Avoid emitting a dummy personality function.
Zoltan Varga [Wed, 29 Jul 2015 21:51:33 +0000 (17:51 -0400)]
[llvm] Avoid emitting a dummy personality function.

8 years agoMerge pull request #1951 from akoeplinger/fix-monop
Rodrigo Kumpera [Wed, 29 Jul 2015 21:26:06 +0000 (17:26 -0400)]
Merge pull request #1951 from akoeplinger/fix-monop

[monop] Set MONO_PATH when running tests so class libs are found

8 years agoMerge pull request #1953 from brpocock/master
João Matos [Wed, 29 Jul 2015 21:14:46 +0000 (22:14 +0100)]
Merge pull request #1953 from brpocock/master

Report XDG Documents directory for SpecialFolder.MyDocuments

8 years agoMerge pull request #1954 from kumpera/fix_aot_compilation
João Matos [Wed, 29 Jul 2015 21:08:48 +0000 (22:08 +0100)]
Merge pull request #1954 from kumpera/fix_aot_compilation

Fix OSX aot compilation when there's a space in a file path.

8 years agoFix aot compilation when the path has spaces.
Rodrigo Kumpera [Wed, 29 Jul 2015 21:05:17 +0000 (17:05 -0400)]
Fix aot compilation when the path has spaces.

8 years ago[tests] iOS9 (beta) have fixed bug #27864, adjust test
Sebastien Pouliot [Wed, 29 Jul 2015 20:45:15 +0000 (16:45 -0400)]
[tests] iOS9 (beta) have fixed bug #27864, adjust test

8 years agoReport XDG Documents directory for SpecialFolder.MyDocuments
Bruce-Robert Fenn Pocock [Wed, 29 Jul 2015 20:02:43 +0000 (16:02 -0400)]
Report XDG Documents directory for SpecialFolder.MyDocuments

8 years ago[runtime] Use MONO_SIZEOF_TYPE instead of sizeof (MonoType) and compiler generated...
Rodrigo Kumpera [Wed, 29 Jul 2015 16:04:37 +0000 (12:04 -0400)]
[runtime] Use MONO_SIZEOF_TYPE instead of sizeof (MonoType) and compiler generated copying.

On amd64 MONO_SIZEOF_TYPE is 12 and sizeof(MonoType) is 16. This leads to memory corruption
if one uses sizeof instead of the specific size.

This is one of those oddball behaviors of the runtime that makes easy things very hard. :(

8 years ago[runtime] Introduce mono_method_get_wrapper_cache to fetch the right wrappers set...
Rodrigo Kumpera [Tue, 28 Jul 2015 18:14:47 +0000 (14:14 -0400)]
[runtime] Introduce mono_method_get_wrapper_cache to fetch the right wrappers set for a given method.

This removes a ton of duplicated code around the runtime. There are still a few cases that could not be
unified due to the hashtables been initialized differently, which requires further reviewing.

8 years ago[runtime] Use a single function to free the contents of MonoWrapperCaches. Remove...
Rodrigo Kumpera [Tue, 28 Jul 2015 16:09:42 +0000 (12:09 -0400)]
[runtime] Use a single function to free the contents of MonoWrapperCaches. Remove duplicated code.

8 years ago[corlib] Fix out of range FileStream position error message
Marek Safar [Wed, 29 Jul 2015 10:14:38 +0000 (12:14 +0200)]
[corlib] Fix out of range FileStream position error message

8 years ago[mcs] Report error for missing win32 icon.
Marek Safar [Tue, 28 Jul 2015 22:18:39 +0000 (00:18 +0200)]
[mcs] Report error for missing win32 icon.

8 years ago[xbuild] Use correct property for Win32Icon. Fixes #32499
Marek Safar [Tue, 28 Jul 2015 22:07:30 +0000 (00:07 +0200)]
[xbuild] Use correct property for Win32Icon. Fixes #32499

8 years ago[llvm] Emit the file info struct initializer using the proper types.
Zoltan Varga [Tue, 28 Jul 2015 21:03:58 +0000 (17:03 -0400)]
[llvm] Emit the file info struct initializer using the proper types.

8 years ago[amd64] Avoid saving r11 outside the red zone in the generic trampoline code.
Zoltan Varga [Tue, 28 Jul 2015 20:49:47 +0000 (16:49 -0400)]
[amd64] Avoid saving r11 outside the red zone in the generic trampoline code.

8 years ago[monop] Set MONO_PATH when running tests so class libs are found
Alexander Köplinger [Tue, 28 Jul 2015 20:17:54 +0000 (22:17 +0200)]
[monop] Set MONO_PATH when running tests so class libs are found

When the monop tests were added in 6c9ad41d85a668550d0d6077cd3f7d504fe6b6eb the MONO_PATH
variable wasn't included. This means that the tests actually ran against the system-provided
Mono class libs instead of the in-tree versions (or failed in case of CI with only monolite).

8 years agoRevert "[System] Don't assume WebConnectionStream of unknown http methods require...
Martin Baulig [Tue, 28 Jul 2015 17:06:08 +0000 (19:06 +0200)]
Revert "[System] Don't assume WebConnectionStream of unknown http methods require write stream. Fixes #31830"

This reverts commit 8ccfe0f8ff71d18151f8aad90d0855dfd2d2a723.

This commit breaks the Content-Type logic for existing HTTP verbs such as for instance
using DELETE with an empty body [1].  Added two new test cases [2] and [3] to the stable
branch of the web-tests (https://github.com/xamarin/web-tests/tree/stable) for the particular
scenario from bug #31830 as well as the default HttpClient.SendAsync() without a Content [4].

The rules are as follows:

1.) HttpWebRequest adds the Content-Length header if and only if you're calling
    GetRequestStream(); a length of 0 will be used if you don't actually write
    any content.

    This is true for POST, PUT, DELETE and "obscute" verbs.

2.) HttpClient.SendAsync() always adds a Content-Length header.

Tests:

[1] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L84

[2] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L296

[3] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L134

[4] https://github.com/xamarin/web-tests/blob/31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L127

(cherry picked from commit 3f1ae72f1b385c3c5e4b5ac2b93d13418c020f02)

8 years ago[runtime] Remove some dead code.
Zoltan Varga [Tue, 28 Jul 2015 18:01:23 +0000 (14:01 -0400)]
[runtime] Remove some dead code.

8 years ago[runtime] Print an error message instead of asserting when encountering an old corlib.
Zoltan Varga [Tue, 28 Jul 2015 17:21:15 +0000 (13:21 -0400)]
[runtime] Print an error message instead of asserting when encountering an old corlib.

8 years ago[mini] Fixed void function returning warning.
triton [Tue, 28 Jul 2015 13:54:01 +0000 (14:54 +0100)]
[mini] Fixed void function returning warning.

8 years ago[msvc] Update Mono DLL export definitions.
triton [Tue, 28 Jul 2015 13:53:11 +0000 (14:53 +0100)]
[msvc] Update Mono DLL export definitions.

8 years ago[msvc] Update Visual Studio project files.
triton [Tue, 28 Jul 2015 13:52:31 +0000 (14:52 +0100)]
[msvc] Update Visual Studio project files.

8 years ago[mcs] Do member declaration obsolete types references check after all members are...
Marek Safar [Tue, 28 Jul 2015 12:56:45 +0000 (14:56 +0200)]
[mcs] Do member declaration obsolete types references check after all members are defined. Fixes #32451

8 years ago[runtime] Remove mono_marshal_free_inflated_wrappers because its only call site frees...
Alexander Kyte [Wed, 13 May 2015 08:03:53 +0000 (08:03 +0000)]
[runtime] Remove mono_marshal_free_inflated_wrappers because its only call site frees the caches anyways.

Since we now only remove methods from caches in the image set it belong we no longer needs to do it since
they will be gone together with the method itself.

8 years ago[runtime] Move caches present in both MonoImage and MonoImageSet into an embedded...
Alexander Kyte [Tue, 12 May 2015 16:15:41 +0000 (16:15 +0000)]
[runtime] Move caches present in both MonoImage and MonoImageSet into an embedded struct.

8 years ago[runtime] Duplicate some more of the image caches in MonoImageSet
Alexander Kyte [Mon, 11 May 2015 19:21:43 +0000 (19:21 +0000)]
[runtime] Duplicate some more of the image caches in MonoImageSet

Changes by Rodrigo Kumpera:

Added missing freeing code.
Fixed insertion into runtime_invoke_direct_cache.
Fixed some of the cleanup in mono_marshal_free_inflated_wrappers.

8 years ago[runtime] Removed confusing/cross-cutting function mono_method_inflated_lookup and...
Alexander Kyte [Wed, 13 May 2015 06:26:59 +0000 (06:26 +0000)]
[runtime] Removed confusing/cross-cutting function mono_method_inflated_lookup and inlined at only call site.

8 years ago[runtime] Move caches from Images to ImageSets if their keys contain generic types
Alexander Kyte [Wed, 6 May 2015 21:56:11 +0000 (17:56 -0400)]
[runtime] Move caches from Images to ImageSets if their keys contain generic types

We currently have a partial ordering of dependencies between ImageSets and images.
If you free an image that an ImageSet depends on, you must free the
ImageSet. The inverse is not true. Freeing the ImageSet does not free
any images.

We had some caches in each Image which used method signatures as keys.
When an image signature refers to a type stored in an ImageSet, and that
ImageSet has been unloaded, the signature will remain in the cache for
the Image.

When we have another object hash to the same slot as this signature, we
must check if the two signatures are actually equal, that is if they are
equal keys or a hash collision. In this check we will refer to the
MonoType in the freed ImageSet.

By moving the caches containing inflated type references into the ImageSets
holding these inflated types, we ensure that the cache items are always safe
to dereference.

Why not simply remove the signatures from all caches they contain on
freeing the signature? This is much more work. A signature with a dozen
type parameters in a dozen images may have been used as a key in any of these
images. We would have to check all caches in all images the signature
refers to. As these caches use open addressing, in the worst time this
can take

```
(# images in signature) x (# caches per image) x (# of slots traversed on average)
```

steps. By placing it on the ImageSet, this takes only the steps required
to free a hash table. It is also easier to reason about.

Changes by Rodrigo Kumpera:

Added locking comments to the new fields in MonoImageSet.

Fixed the selected cache in mono_marshal_get_delegate_begin_invoke, mono_marshal_get_delegate_end_invoke,
mono_marshal_get_delegate_invoke_internal and mono_marshal_get_synchronized_wrapper.

The original code was using the image set of the class instead of the IS of the inflated method. This would
pick the wrong image if the method belonged to a different IS.

8 years ago[marsha] Use TRUE instead of 1 for setting a boolean field.
Rodrigo Kumpera [Thu, 23 Jul 2015 20:21:41 +0000 (16:21 -0400)]
[marsha] Use TRUE instead of 1 for setting a boolean field.

8 years ago[runtime] Copy signature return type when copying MonoMethodSignature
Alexander Kyte [Thu, 7 May 2015 19:24:00 +0000 (15:24 -0400)]
[runtime] Copy signature return type when copying MonoMethodSignature

This commit also removed an extra signature duplicator living in
marshal.c, so that this fix is used consistently

8 years ago[runtime] Make the code more c++ clean by renaming this->this_obj.
Zoltan Varga [Tue, 28 Jul 2015 02:35:49 +0000 (22:35 -0400)]
[runtime] Make the code more c++ clean by renaming this->this_obj.

8 years ago[jit] Make the jit code more c++ clean by renaming class->klass and this->this_arg...
Zoltan Varga [Tue, 28 Jul 2015 02:04:42 +0000 (22:04 -0400)]
[jit] Make the jit code more c++ clean by renaming class->klass and this->this_arg/this_ins.

8 years agoMerge pull request #1950 from akoeplinger/fix-responsefile-win
Zoltan Varga [Tue, 28 Jul 2015 00:59:47 +0000 (20:59 -0400)]
Merge pull request #1950 from akoeplinger/fix-responsefile-win

[build] library.make: Avoid collisions in response file name for facades on Windows

8 years agoMerge pull request #1943 from alexrp/profiler-improvements
Rodrigo Kumpera [Mon, 27 Jul 2015 23:10:23 +0000 (19:10 -0400)]
Merge pull request #1943 from alexrp/profiler-improvements

Follow-up to #1926

8 years ago[build] library.make: Avoid collisions in response file name for facades on Windows
Alexander Köplinger [Mon, 27 Jul 2015 22:17:00 +0000 (15:17 -0700)]
[build] library.make: Avoid collisions in response file name for facades on Windows

When additional facades were added in 04114a5e9d141a4f424564fea95ac4480cb0a16a, the Windows Cygwin build broke.
Turns out, when building the System.IO.Comporession facade assembly it wanted to use the SharpCompress sources
of the real assembly and couldn't find it (which made no sense since since the facade doesn't even list them in
its .sources file).

After inspecting library.make what happens is this: the response file is defined as $(PROFILE)_$(LIBRARY).response,
but this results in the same value for both the real assembly and the facade assembly.
This means that since the real assembly was compiled first, the response file contained the source list of the real
assembly - which was then used to compile the facade (make happily reused the response file since it already existed).

The fix is to put $(LIBRARY_SUBDIR) into the filename so the facade assembly gets a different response file.
Same for the makefrag.

8 years ago[runtime] Add docs for new domain and context API functions.
Alex Rønne Petersen [Sat, 25 Jul 2015 18:47:33 +0000 (20:47 +0200)]
[runtime] Add docs for new domain and context API functions.

8 years ago[runtime] Make some headers c++ clean.
Zoltan Varga [Mon, 27 Jul 2015 22:25:59 +0000 (18:25 -0400)]
[runtime] Make some headers c++ clean.

8 years ago[mcs] Fix obsolete checks on resolved types when type is inflated generic type with...
Marek Safar [Mon, 27 Jul 2015 18:09:26 +0000 (20:09 +0200)]
[mcs] Fix obsolete checks on resolved types when type is inflated generic type with concrete type arguments.

8 years agoMerge pull request #1923 from lukaszunity/start-managed-process-fix
João Matos [Mon, 27 Jul 2015 15:43:40 +0000 (16:43 +0100)]
Merge pull request #1923 from lukaszunity/start-managed-process-fix

Process.Start fix for managed program

8 years agoMerge pull request #1948 from akoeplinger/fix-httplistener-test-race
João Matos [Mon, 27 Jul 2015 13:23:28 +0000 (14:23 +0100)]
Merge pull request #1948 from akoeplinger/fix-httplistener-test-race

[System] Fix race condition in HttpListenerTest.ConnectionReuse test

8 years ago[System] Fix race condition in HttpListenerTest.ConnectionReuse test
Alexander Köplinger [Mon, 27 Jul 2015 13:17:23 +0000 (15:17 +0200)]
[System] Fix race condition in HttpListenerTest.ConnectionReuse test

There was a race so that sometimes ipEndPoint wasn't yet assigned when the method returned,
which resulted in the test failing like this:

 MESSAGE:  reuse1
  Expected: <127.0.0.1:54370>
  But was: null

To fix this the race, we now wait until ipEndPoint is assigned before returning.

The test was actually disabled on Android because of this (see 7cb4cc9c0e61d921c75ab654641a154d12cc8085),
we can reenable it again as it should now work fine.

8 years ago[mcs] Reset doc reader state after expression bodied property. Fixes #32456
Marek Safar [Mon, 27 Jul 2015 12:10:13 +0000 (14:10 +0200)]
[mcs] Reset doc reader state after expression bodied property. Fixes #32456

8 years agoMerge pull request #1909 from esdrubal/reflection
Marcos Henrich [Mon, 27 Jul 2015 11:43:38 +0000 (12:43 +0100)]
Merge pull request #1909 from esdrubal/reflection

[SRE] Implemented missing SRE features.

8 years agoMerge pull request #1947 from directhex/fix-kfreebsd
João Matos [Mon, 27 Jul 2015 10:34:37 +0000 (11:34 +0100)]
Merge pull request #1947 from directhex/fix-kfreebsd

mono-threads-linux.c also applies to other OSes with GNU userland

8 years ago[build] Remove generated files
Marek Safar [Mon, 27 Jul 2015 10:31:29 +0000 (12:31 +0200)]
[build] Remove generated files