mono.git
8 years ago[gc] Move OOM handling into the runtime from the GC.
Rodrigo Kumpera [Wed, 20 Jan 2016 19:51:52 +0000 (14:51 -0500)]
[gc] Move OOM handling into the runtime from the GC.

The current gc interface requires the GC to call mono_gc_out_of_memory on allocation failure.

It won't work if we move away from implementing it with mono_raise_exception as we need to manually bubble
the OOM all the up to the m2n border.

The good thing is that this simplified the gc interface and actually fixes a corner case bug in sgen where
it did not call mono_gc_out_of_memory on alloc failure.

8 years ago[llvmonly] Fix runtime invoke calls to gsharedvt methods without variable signatures...
Zoltan Varga [Wed, 20 Jan 2016 20:47:30 +0000 (15:47 -0500)]
[llvmonly] Fix runtime invoke calls to gsharedvt methods without variable signatures. Add gsharedvt out wrappers and in wrappers for delegate invoke wrappers.

8 years ago[runtime] Add a new helper function mono_method_get_full_name (), which is similar...
Zoltan Varga [Wed, 20 Jan 2016 20:33:44 +0000 (15:33 -0500)]
[runtime] Add a new helper function mono_method_get_full_name (), which is similar to mono_method_full_name (), but the result includes the return type as well.

8 years agoMerge pull request #2465 from alexanderkyte/remoting_debugger_ifdef_fix
Zoltan Varga [Wed, 20 Jan 2016 16:28:38 +0000 (11:28 -0500)]
Merge pull request #2465 from alexanderkyte/remoting_debugger_ifdef_fix

[runtime] ifdef out remoting function call in debugger

8 years ago[runtime] ifdef out remoting function call in debugger
Alexander Kyte [Wed, 20 Jan 2016 16:13:38 +0000 (11:13 -0500)]
[runtime] ifdef out remoting function call in debugger

8 years ago[llvmonly] Fix the type of the vret_addr argument.
Zoltan Varga [Wed, 20 Jan 2016 02:40:45 +0000 (21:40 -0500)]
[llvmonly] Fix the type of the vret_addr argument.

8 years ago[System]: Change namespace for some internal classes.
Martin Baulig [Mon, 18 Jan 2016 19:50:27 +0000 (20:50 +0100)]
[System]: Change namespace for some internal classes.

(cherry picked from commit 997513da02db9a4a448231e115da36b31814a6c0)

8 years ago[System]: Remove unpredictable pluggable setup and cleanup APIs.
Martin Baulig [Tue, 19 Jan 2016 17:16:46 +0000 (18:16 +0100)]
[System]: Remove unpredictable pluggable setup and cleanup APIs.

(cherry picked from commit 2d945d75bb1abb3a750e6fa2bc0facb768228dbb)

8 years ago[aot] Enable -O=gsharedvt by default when its supported on the platform.
Zoltan Varga [Tue, 19 Jan 2016 22:56:05 +0000 (17:56 -0500)]
[aot] Enable -O=gsharedvt by default when its supported on the platform.

8 years ago[aot] Small refactoring for gsharedvt method lookup.
Zoltan Varga [Tue, 19 Jan 2016 22:49:49 +0000 (17:49 -0500)]
[aot] Small refactoring for gsharedvt method lookup.

8 years ago[llvmonly] Set the del->rgctx field for delegates created using reflection as well.
Zoltan Varga [Tue, 19 Jan 2016 20:57:32 +0000 (15:57 -0500)]
[llvmonly] Set the del->rgctx field for delegates created using reflection as well.

8 years ago[tests] Output more debug information in case of test-runner.exe crash
Ludovic Henry [Tue, 19 Jan 2016 18:46:27 +0000 (18:46 +0000)]
[tests] Output more debug information in case of test-runner.exe crash

8 years ago[io-layer] Fix tarball broken by 39393f118d6a532ccca30a9103a3dd0febdfbef6
Alexander Köplinger [Tue, 19 Jan 2016 14:25:02 +0000 (15:25 +0100)]
[io-layer] Fix tarball broken by 39393f118d6a532ccca30a9103a3dd0febdfbef6

A new file io-trace.h was added but not listed in any Makefile sources anywhere so it didn't end up in the tarball.

8 years agoMerge pull request #2433 from alexrp/thread-volatile-semantics
Alex Rønne Petersen [Tue, 19 Jan 2016 13:02:51 +0000 (14:02 +0100)]
Merge pull request #2433 from alexrp/thread-volatile-semantics

[runtime] Make VolatileRead/VolatileWrite semantics compatible with MS.NET.

8 years agoMerge pull request #2399 from alexanderkyte/seq_point_nostop
Zoltan Varga [Tue, 19 Jan 2016 09:40:24 +0000 (04:40 -0500)]
Merge pull request #2399 from alexanderkyte/seq_point_nostop

[runtime] Use explicit loop checking to remove depth limitation of sequence point search.

8 years agoMerge pull request #2397 from alexanderkyte/debugger_appdomain
Zoltan Varga [Tue, 19 Jan 2016 09:39:54 +0000 (04:39 -0500)]
Merge pull request #2397 from alexanderkyte/debugger_appdomain

[runtime] Read fields out of TransparentProxies correctly in debugger agent FIXES 36823

8 years agoMerge pull request #2450 from grendello/io-layer-trace
Marek Habersack [Tue, 19 Jan 2016 07:49:42 +0000 (08:49 +0100)]
Merge pull request #2450 from grendello/io-layer-trace

Replace the old DEBUG messages with calls to mono_trace.

8 years agoMerge pull request #2451 from akoeplinger/fix-osx
monojenkins [Tue, 19 Jan 2016 06:45:15 +0000 (06:45 +0000)]
Merge pull request #2451 from akoeplinger/fix-osx

[Mono.Posix] Fix OSX build break by checking if accept4() is available

It's a Linux-specific extension and not available on OSX or Linux <2.6.28

/cc @steffen-kiess @jonpryor

@monojenkins merge

8 years ago[Mono.Posix] Fix OSX build break by checking if accept4() is available
Alexander Köplinger [Tue, 19 Jan 2016 02:58:25 +0000 (03:58 +0100)]
[Mono.Posix] Fix OSX build break by checking if accept4() is available

It's a Linux-specific extension and not available on OSX or Linux <2.6.28

8 years agoMerge pull request #2447 from kumpera/amd64_gsharedvt
monojenkins [Tue, 19 Jan 2016 00:30:57 +0000 (00:30 +0000)]
Merge pull request #2447 from kumpera/amd64_gsharedvt

[amd64] First pass at fixing issues related to gsharedvt.

8 years ago[llvmonly] Avoid inlining methods which call MethodBase:GetCurrentMethod ().
Zoltan Varga [Tue, 19 Jan 2016 00:15:30 +0000 (19:15 -0500)]
[llvmonly] Avoid inlining methods which call MethodBase:GetCurrentMethod ().

8 years ago[llvmonly] Fix the passing of byref arguments in runtime invoke.
Zoltan Varga [Mon, 18 Jan 2016 23:41:18 +0000 (18:41 -0500)]
[llvmonly] Fix the passing of byref arguments in runtime invoke.

8 years agoReplace DEBUG messages with calls to mono_trace
Marek Habersack [Mon, 18 Jan 2016 22:42:20 +0000 (23:42 +0100)]
Replace DEBUG messages with calls to mono_trace

The messages contain useful debugging information which is unavailable
unless the mono runtime is recompiled. The debugging information is
particularly useful on mobile platforms and in test runs on bots.

The I/O layer trace messages can be disabled on compile time by
defining the DISABLE_IO_LAYER_TRACE preprocessor symbol.

8 years agoMove mono_trace to header file
Marek Habersack [Mon, 18 Jan 2016 22:41:30 +0000 (23:41 +0100)]
Move mono_trace to header file

This commit moves mono_trace to a header file so that all the
calls are inlined, avoiding one function call at the small expense
of binary size.

8 years ago[llvmonly] Fix the MethodBase.GetCurrentMethod () intrinsic so it works with generic...
Zoltan Varga [Mon, 18 Jan 2016 23:25:48 +0000 (18:25 -0500)]
[llvmonly] Fix the MethodBase.GetCurrentMethod () intrinsic so it works with generic methods.

8 years agoMerge pull request #2006 from steffen-kiess/posix-sockets-2
Jonathan Pryor [Mon, 18 Jan 2016 22:38:38 +0000 (17:38 -0500)]
Merge pull request #2006 from steffen-kiess/posix-sockets-2

[Mono.Posix] Add wrappers for struct sockaddr_*

8 years agoMerge pull request #2 from xmcclure/rodrigo-fix-build
Rodrigo Kumpera [Mon, 18 Jan 2016 22:35:20 +0000 (17:35 -0500)]
Merge pull request #2 from xmcclure/rodrigo-fix-build

Additional stubs to fix standard build following [amd64] changes

8 years agoAdditional stubs to fix standard build following [amd64] changes
Andi McClure [Mon, 18 Jan 2016 22:31:36 +0000 (17:31 -0500)]
Additional stubs to fix standard build following [amd64] changes

8 years ago[llvm] Fix some type imcompatibility problems which happen when a vreg holding an...
Zoltan Varga [Mon, 18 Jan 2016 21:28:28 +0000 (16:28 -0500)]
[llvm] Fix some type imcompatibility problems which happen when a vreg holding an objref is made global and stored into its location which has a different type (IntPtrType () vs ObjRefType ()).

8 years agoMerge pull request #2435 from xmcclure/x-refresh
Rodrigo Kumpera [Mon, 18 Jan 2016 19:38:53 +0000 (14:38 -0500)]
Merge pull request #2435 from xmcclure/x-refresh

Improve support for Xamarin platform extensions

8 years ago[llvmonly] Fix the catching of exceptions of open types in shared methods by passing...
Zoltan Varga [Mon, 18 Jan 2016 19:02:29 +0000 (14:02 -0500)]
[llvmonly] Fix the catching of exceptions of open types in shared methods by passing mrgctx/this to the mono_llvm_match_exception () function.

8 years ago[llvm] Add some missing opcodes.
Zoltan Varga [Mon, 18 Jan 2016 17:02:22 +0000 (12:02 -0500)]
[llvm] Add some missing opcodes.

8 years ago[runtime] Fix native-to-managed calls to delegates which wrap a virtual method. Fixes...
Zoltan Varga [Mon, 18 Jan 2016 16:43:01 +0000 (11:43 -0500)]
[runtime] Fix native-to-managed calls to delegates which wrap a virtual method. Fixes #37695.

8 years ago[linker] improve method dependencies dumping
Radek Doulik [Mon, 18 Jan 2016 11:26:33 +0000 (12:26 +0100)]
[linker] improve method dependencies dumping

8 years ago[Mono.Posix] Add wrappers for struct sockaddr_*
Steffen Kieß [Mon, 18 Jan 2016 09:04:09 +0000 (10:04 +0100)]
[Mono.Posix] Add wrappers for struct sockaddr_*

Add wrappers for the sockaddr_* structures and add the syscalls using these
structures (bind(), accept(), ...).

8 years ago[llvmonly] Add an instrinsics for MethodBase.GetCurrentMethod () so it works on platf...
Zoltan Varga [Sun, 17 Jan 2016 23:25:17 +0000 (18:25 -0500)]
[llvmonly] Add an instrinsics for MethodBase.GetCurrentMethod () so it works on platforms without stack walks.

8 years ago[corlib] Improve CancellationTokenSource test
Marek Safar [Sat, 16 Jan 2016 06:59:33 +0000 (07:59 +0100)]
[corlib] Improve CancellationTokenSource test

8 years ago[msvc] Fix Windows build
Alexander Köplinger [Fri, 15 Jan 2016 23:30:58 +0000 (00:30 +0100)]
[msvc] Fix Windows build

handle.c/h were missing from the projects.

8 years ago[llvmonly] Share more wrapper types. Avoid adding out wrappers for calls from gshared...
Zoltan Varga [Fri, 15 Jan 2016 23:02:51 +0000 (18:02 -0500)]
[llvmonly] Share more wrapper types. Avoid adding out wrappers for calls from gsharedvt code to gsharedvt code with a normal signature. Fix the handling of pointer types in runtime invoke. Fix the passing of the same fixed gsharedvt argument in multiple calls.

8 years ago[llvmonly] Avoid a crash in ves_icall_GetCurrentMethod () if the stack walk fails.
Zoltan Varga [Fri, 15 Jan 2016 22:57:20 +0000 (17:57 -0500)]
[llvmonly] Avoid a crash in ves_icall_GetCurrentMethod () if the stack walk fails.

8 years ago[amd64] Fix setting of MonoCompile:ret:dreg in mono_arch_allocate_vars.
Rodrigo Kumpera [Fri, 15 Jan 2016 21:01:58 +0000 (16:01 -0500)]
[amd64] Fix setting of MonoCompile:ret:dreg in mono_arch_allocate_vars.

The code in mono_arch_allocate_vars would set cfg->ret->dreg to cfg->ret->inst_c0
regardless. This is ok in some cases, but bad in others.

For OP_REGVAR this would do the right thing, dreg should be register that holds
that argument.

For when vret_addr is used, it would modify a var that is not used, so harmless.

For OP_REGOFFSET, inst_c0 alias with inst_offset, which is set to the offset from
RBP to read the var from. So we'd have a dreg set to, sometimes, a negative number.

This was not a problem as after mono_arch_allocate_vars only mono_spill_global_vars
is called and it only checks the dreg in the case of gsharedvt.

The fix is pretty simple, move setting from happening in all cases to only for OP_REGVAR.

8 years ago[amd64] Add arg_size field to ArgInfo and update it when storage is ArgOnStack
Rodrigo Kumpera [Tue, 5 Jan 2016 21:58:30 +0000 (16:58 -0500)]
[amd64] Add arg_size field to ArgInfo and update it when storage is ArgOnStack

8 years ago[amd64] Properly emit loads to gsharedvt stack args.
Rodrigo Kumpera [Tue, 22 Dec 2015 07:20:40 +0000 (02:20 -0500)]
[amd64] Properly emit loads to gsharedvt stack args.

8 years ago[amd64] Add is_gsharedvt_return_value to ArgInfo. Save to the stack ArgGSharedVtInReg...
Rodrigo Kumpera [Thu, 17 Dec 2015 00:56:04 +0000 (19:56 -0500)]
[amd64] Add is_gsharedvt_return_value to ArgInfo. Save to the stack ArgGSharedVtInReg args.

The usage of is_gsharedvt_return_value is easier than having a separate storage as supporting
it would require changing all usage sites and this is only needed by start_call.

All incoming arguments in registers must be saved on the stack as the rest of the JIT
expects to be able to load them from their well known places. Without this change, it would
load a random value instead.

8 years ago[amd64] Add definition of GSharedVtCallInfo to mini-amd64.h
Rodrigo Kumpera [Thu, 10 Dec 2015 05:30:33 +0000 (00:30 -0500)]
[amd64] Add definition of GSharedVtCallInfo to mini-amd64.h

The GSharedVtCallInfo structure used is the same to the one used by
other targets.

8 years ago[amd64] Add some of the missing bits of gsharedvt.
Rodrigo Kumpera [Tue, 8 Dec 2015 21:35:48 +0000 (16:35 -0500)]
[amd64] Add some of the missing bits of gsharedvt.

This was enough to get mscorlib to FullAOT with gsharedvt enabled.

Makefile.am.in:
Don't exclude GSHAREDVT from the tests.
Removed DYNCALL too, as it's supported too.

mini-amd64.c (mono_arch_init):
Register mono_amd64_start_gsharedvt_call jit icall.

mini-amd64.c:
Fix a typo in the ifdef guarding inclusion of the gsharedvt extension.

mini-amd64.c (mono_arch_emit_outarg_vt):
Implement decomposing of ArgGSharedVtOnStack to a simple store on the stack.

mini-amd64.h:
define MONO_ARCH_GSHAREDVT_SUPPORTED
Export mono_amd64_start_gsharedvt_call

tramp-amd64.c (mono_arch_create_sdb_trampoline):
Add missing mono_profiler_code_buffer_new call.
Add a couple of functions to !ENABLE_GSHAREDVT

aot-compiler.c (arch_emit_gsharedvt_arg_trampoline):
Implement it for amd64 as a pair of GOT loads (same for other archs).

8 years agoMerge pull request #2446 from akoeplinger/remove-leftover-file
monojenkins [Fri, 15 Jan 2016 20:15:17 +0000 (20:15 +0000)]
Merge pull request #2446 from akoeplinger/remove-leftover-file

[corlib] Remove left-over files from long ago (System.PAL/Linux)

They are no longer in use and cause confusion as they show up in search results.

@monojenkins merge

8 years agoFix incorrect comment on mono_jit_init_version
Andi McClure [Fri, 15 Jan 2016 19:31:42 +0000 (14:31 -0500)]
Fix incorrect comment on mono_jit_init_version

8 years agoClarify when ucontext_t is available
Andi McClure [Fri, 15 Jan 2016 19:31:12 +0000 (14:31 -0500)]
Clarify when ucontext_t is available

mono-context currently uses a mix of MONO_SIGNAL_USE_SIGACTION and
UCONTEXT_REG_RAX #ifs to determine whether ucontext_t is available.
UCONTEXT_REG_RAX is unreliable, and MONO_SIGNAL_USE_SIGACTION is
misnamed because it is nowhere used to gate use of sigaction.
Standardize on a new MONO_SIGNAL_USE_UCONTEXT_T, replacing SIGACTION.

8 years agoBottleneck module loader platform macros
Andi McClure [Mon, 18 Jan 2016 15:54:51 +0000 (10:54 -0500)]
Bottleneck module loader platform macros

processes.c contains implementations for module loading for several
platforms. Rather than scattering PLATFORM_MACOSX etc through the
file, pick a loader at the top of the file and base #ifs on that. This
makes BSD code clearer and makes it easier to special-case OS variants
where the normal loader is not available.

8 years agoFix build on platforms where native thread IDs are not pointer sized
Andi McClure [Fri, 15 Jan 2016 19:18:56 +0000 (14:18 -0500)]
Fix build on platforms where native thread IDs are not pointer sized

Certain of our debug prints assume thread ids can be cast directly to
a pointer. This does not work on platforms where thread IDs are ints.

8 years ago[corlib] Remove left-over files from long ago (System.PAL/Linux)
Alexander Köplinger [Fri, 15 Jan 2016 18:30:18 +0000 (19:30 +0100)]
[corlib] Remove left-over files from long ago (System.PAL/Linux)

They are no longer in use and cause confusion as they show up in search results.

8 years agoMerge pull request #2444 from xmcclure/randfixes
monojenkins [Fri, 15 Jan 2016 18:20:15 +0000 (18:20 +0000)]
Merge pull request #2444 from xmcclure/randfixes

Bugfixes in mono-rand.c

2 commits:

* Make mono-rand consistent (fixes threadpool on some UNIX systems)

  mono-rand.c defines a function interface and provides three implementations (Windows, modern UNIX, base C standard). The clients of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear to be consistent in how they use this interface, but the interface is not documented, and the C-only implementation deviates from it (the return value of init is different). The result is that threadpool-ms-io fails an assert when run on a system using the C-only implementation. I documented the interface and fixed the C-only quirk.

* Fix nonuniform distribution of mono_rand_try_get_uint32

  mono_rand_try_get_uint32 returns a value in a range min..max inclusive. Due to a math error the ‘max’ value will be returned only one out of every 2^32-1 calls to the function. This is currently harmless because the only current callers of this function (in threadpool-ms-io) will run fine even if their max value is never returned, but it could become a problem later.

8 years agoMerge pull request #2445 from nealef/master
Alexander Köplinger [Fri, 15 Jan 2016 17:52:22 +0000 (18:52 +0100)]
Merge pull request #2445 from nealef/master

Fix certmgr when a unicode encoded null is used as password

8 years agoFix certmgr when a unicode encoded null is used as password
Neale [Fri, 15 Jan 2016 16:30:56 +0000 (11:30 -0500)]
Fix certmgr when a unicode encoded null is used as password

8 years agoFix nonuniform distribution of mono_rand_try_get_uint32
Andi McClure [Fri, 15 Jan 2016 16:19:35 +0000 (11:19 -0500)]
Fix nonuniform distribution of mono_rand_try_get_uint32

mono_rand_try_get_uint32 returns a value in a range min..max
inclusive. Due to a math error the ‘max’ value will be returned only
one out of every 2^32-1 calls to the function. This is currently
harmless because the only current callers of this function (in
threadpool-ms-io) will run fine even if their max value is never
returned, but it could become a problem later.

8 years agoMake mono-rand consistent (fixes threadpool on some UNIX systems)
Andi McClure [Fri, 15 Jan 2016 16:01:31 +0000 (11:01 -0500)]
Make mono-rand consistent (fixes threadpool on some UNIX systems)

mono-rand.c defines a function interface and provides three
implementations (Windows, modern UNIX, base C standard). The clients
of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear
to be consistent in how they use this interface, but the interface is
not documented, and the C-only implementation deviates from it (the
return value of init is different). The result is that
threadpool-ms-io fails an assert when run on a system using the C-only
implementation. I documented the interface and fixed the C-only quirk.

8 years ago[getline] Improve the embedded sample
Miguel de Icaza [Fri, 15 Jan 2016 15:26:16 +0000 (10:26 -0500)]
[getline] Improve the embedded sample

8 years ago[getline] Fix the logic for advancing the top item
Miguel de Icaza [Fri, 15 Jan 2016 15:21:38 +0000 (10:21 -0500)]
[getline] Fix the logic for advancing the top item

8 years ago[Process] Fix monodroid build
Ludovic Henry [Fri, 15 Jan 2016 15:14:03 +0000 (15:14 +0000)]
[Process] Fix monodroid build

8 years ago[llvm] Split long bblocks instead of disabling llvm for methods with them.
Zoltan Varga [Fri, 15 Jan 2016 15:05:34 +0000 (10:05 -0500)]
[llvm] Split long bblocks instead of disabling llvm for methods with them.

8 years ago[llvm] Fix a type conversion problem when calling the same method with two different...
Zoltan Varga [Fri, 15 Jan 2016 14:47:44 +0000 (09:47 -0500)]
[llvm] Fix a type conversion problem when calling the same method with two different signatures.

8 years agoMerge pull request #2362 from ludovic-henry/fix-process-missedoutput
Ludovic Henry [Fri, 15 Jan 2016 14:32:32 +0000 (14:32 +0000)]
Merge pull request #2362 from ludovic-henry/fix-process-missedoutput

[Process] Use ReferenceSource process async output/error reader

8 years agoBump reference source for CancellationTokenSource fixes
Marek Safar [Fri, 15 Jan 2016 14:28:45 +0000 (15:28 +0100)]
Bump reference source for CancellationTokenSource fixes

8 years ago[mcs] Update project file
Marek Safar [Fri, 15 Jan 2016 08:59:39 +0000 (09:59 +0100)]
[mcs] Update project file

8 years ago[mcs] Use probing like aproach for member access completion
Marek Safar [Fri, 15 Jan 2016 08:58:31 +0000 (09:58 +0100)]
[mcs] Use probing like aproach for member access completion

8 years agoMerge pull request #2403 from BrzVlad/feature-emulation-delay
Vlad Brezae [Fri, 15 Jan 2016 02:00:17 +0000 (02:00 +0000)]
Merge pull request #2403 from BrzVlad/feature-emulation-delay

[jit] Delay opcode emulation to allow optimization passes to run on these opcodes

8 years ago[llvmonly] Fix mono_patch_info_equal () for MONO_PATCH_INFO_GSHAREDVT_IN_WRAPPER.
Zoltan Varga [Fri, 15 Jan 2016 00:54:54 +0000 (19:54 -0500)]
[llvmonly] Fix mono_patch_info_equal () for MONO_PATCH_INFO_GSHAREDVT_IN_WRAPPER.

8 years ago[llvmonly] Fix the addition of gsharedvt in wrappers around unbox wrappers.
Zoltan Varga [Thu, 14 Jan 2016 23:39:03 +0000 (18:39 -0500)]
[llvmonly] Fix the addition of gsharedvt in wrappers around unbox wrappers.

8 years ago[llvmonly] Fix the gsharedvt parameter passing code so it emits valid llvm il.
Zoltan Varga [Thu, 14 Jan 2016 23:00:47 +0000 (18:00 -0500)]
[llvmonly] Fix the gsharedvt parameter passing code so it emits valid llvm il.

8 years ago[llvmonly] Add unwind info for unbox wrappers, not the get_unbox_tramp () generated...
Zoltan Varga [Thu, 14 Jan 2016 22:04:54 +0000 (17:04 -0500)]
[llvmonly] Add unwind info for unbox wrappers, not the get_unbox_tramp () generated function.

8 years ago[llvmonly] Fix initialization of static gshared methods, they receive a vtable as...
Zoltan Varga [Thu, 14 Jan 2016 21:47:29 +0000 (16:47 -0500)]
[llvmonly] Fix initialization of static gshared methods, they receive a vtable as the rgctx argument, not a MonoMethodRuntimeGenericContext. Emit unwind info for unbox wrappers. Fix calls to gsharedvt methods from non-shared delegate invoke wrappers.

8 years agoMerge pull request #2438 from lambdageek/cherry-pick-coop-handle
Aleksey Kliger (λgeek) [Thu, 14 Jan 2016 20:15:51 +0000 (15:15 -0500)]
Merge pull request #2438 from lambdageek/cherry-pick-coop-handle

Cherry pick handles work

8 years agoMerge pull request #2439 from akoeplinger/fix-seqpoint-test
Zoltan Varga [Thu, 14 Jan 2016 19:42:17 +0000 (14:42 -0500)]
Merge pull request #2439 from akoeplinger/fix-seqpoint-test

[mono] test_op_il_seq_point test should use a temp file for NUnit results

8 years ago[mono] test_op_il_seq_point test should use a temp file for NUnit results
Alexander Köplinger [Thu, 14 Jan 2016 19:27:01 +0000 (20:27 +0100)]
[mono] test_op_il_seq_point test should use a temp file for NUnit results

We were seeing red builds on Jenkins because the NUnit xml was malformed when something bad happened
during the test_op_il_seq_point tests and Jenkins couldn't parse it.

To fix this, write the results into a temp file and only rename to .xml at the end when everything worked.

Additionally, fixed a small typo in cleaning the .so files.

8 years ago[runtime] Fixed ARM cross compiler builds.
João Matos [Thu, 14 Jan 2016 18:05:46 +0000 (18:05 +0000)]
[runtime] Fixed ARM cross compiler builds.

8 years ago[jit] Delay emulation to allow optimizations to happen on these ops
Vlad Brezae [Mon, 21 Dec 2015 12:36:44 +0000 (14:36 +0200)]
[jit] Delay emulation to allow optimizations to happen on these ops

Emulation used to happen at emitting time (method_to_ir). Now it is done after the copy propagation pass, where we propagate immediates and can do strength reduction on some of these ops. Because the call to the native function might imply an inlined wrapper which compiles more IL instructions, we need to run the decomposition pass again.

8 years ago[jit] Support decomposition of long imm ops to simple long ops
Vlad Brezae [Tue, 5 Jan 2016 21:43:36 +0000 (23:43 +0200)]
[jit] Support decomposition of long imm ops to simple long ops

8 years ago[jit] Don't crash in mono_op_imm_to_op if opcode is not handled
Vlad Brezae [Tue, 5 Jan 2016 20:32:50 +0000 (22:32 +0200)]
[jit] Don't crash in mono_op_imm_to_op if opcode is not handled

Mimic the behaviour of its counterpart, mono_op_to_op_imm, since crashing limits the usage of the function and it is the responsability of the upper layer.

8 years ago[jit] Don't decompose into unsupported instructions
Vlad Brezae [Tue, 5 Jan 2016 19:40:59 +0000 (21:40 +0200)]
[jit] Don't decompose into unsupported instructions

If we emulate these ops, it means we don't support the *_2 ops and we shouldn't decompose into them.

8 years ago[jit] Don't hardcode the long vreg components
Vlad Brezae [Fri, 11 Dec 2015 13:49:41 +0000 (05:49 -0800)]
[jit] Don't hardcode the long vreg components

8 years ago[handle] rename mono_handle_arena_(initialize|deinitialize)
Aleksey Kliger [Thu, 14 Jan 2016 17:17:57 +0000 (12:17 -0500)]
[handle] rename mono_handle_arena_(initialize|deinitialize)

to mono_handle_arena_init and mono_handle_arena_cleanup, respectively.

8 years ago[handle] Make MONO_HANDLE_ARENA_POP a function-like macro
Aleksey Kliger [Thu, 14 Jan 2016 17:13:29 +0000 (12:13 -0500)]
[handle] Make MONO_HANDLE_ARENA_POP a function-like macro

8 years ago[sgen] Remove DISABLE_CRITICAL_REGION as it's never defined
Ludovic Henry [Mon, 11 Jan 2016 16:16:04 +0000 (16:16 +0000)]
[sgen] Remove DISABLE_CRITICAL_REGION as it's never defined

8 years ago[checked-build] Add in GC critical region assertion
Ludovic Henry [Mon, 11 Jan 2016 14:00:48 +0000 (14:00 +0000)]
[checked-build] Add in GC critical region assertion

8 years ago[checked] Nest MONO_{PREPARE,FINISH}_GC_CRITICAL_REGION
Aleksey Kliger [Mon, 4 Jan 2016 16:26:55 +0000 (11:26 -0500)]
[checked] Nest MONO_{PREPARE,FINISH}_GC_CRITICAL_REGION

8 years ago[coop] store MonoHandleArena pointer in MonoThreadInfo
Aleksey Kliger [Mon, 28 Dec 2015 22:49:15 +0000 (17:49 -0500)]
[coop] store MonoHandleArena pointer in MonoThreadInfo

8 years ago[handle] Add _SETREF_NULL macros for MonoObjectHandle and MonoArrayHandle
Aleksey Kliger [Thu, 7 Jan 2016 23:21:15 +0000 (18:21 -0500)]
[handle] Add _SETREF_NULL macros for MonoObjectHandle and MonoArrayHandle

8 years ago[handle] Rename MonoHandleStorage->obj to MonoHandleStorage->__private_obj
Ludovic Henry [Wed, 6 Jan 2016 15:35:55 +0000 (15:35 +0000)]
[handle] Rename MonoHandleStorage->obj to MonoHandleStorage->__private_obj

8 years ago[handle] Add mono_handle_obj_is_null utility function
Ludovic Henry [Wed, 6 Jan 2016 14:24:35 +0000 (14:24 +0000)]
[handle] Add mono_handle_obj_is_null utility function

8 years ago[llvmonly] Implement Assembly.GetCallingAssembly () in llvmonly mode by saving the...
Zoltan Varga [Thu, 14 Jan 2016 16:26:22 +0000 (11:26 -0500)]
[llvmonly] Implement Assembly.GetCallingAssembly () in llvmonly mode by saving the current assembly in the calling method. Enable it for Activator.CreateInstance () for now.

8 years ago[Process] Use ReferenceSource process async output/error reader
Ludovic Henry [Thu, 17 Dec 2015 17:10:35 +0000 (17:10 +0000)]
[Process] Use ReferenceSource process async output/error reader

By using the referencesource one, we remove a buggy part of the Process class. It will now simply use Stream.{Begin/End}Read, and not a custom implementation that introduces its own bugs.

8 years ago[man/mono.1] Fix typo from 9115bf0a
Alexander Köplinger [Thu, 14 Jan 2016 15:27:46 +0000 (16:27 +0100)]
[man/mono.1] Fix typo from 9115bf0a

8 years ago[runtime] Make sure ptr-to-structure and structure-and-ptr wrappers are unique, this...
Zoltan Varga [Thu, 14 Jan 2016 15:11:55 +0000 (10:11 -0500)]
[runtime] Make sure ptr-to-structure and structure-and-ptr wrappers are unique, this is needed by full aot. Fixes #20186.

8 years ago[mono] Update predefined Hebrew negative sign. Fixes #37681
Marek Safar [Thu, 14 Jan 2016 14:12:59 +0000 (15:12 +0100)]
[mono] Update predefined Hebrew negative sign. Fixes #37681

8 years ago[corlib] Bump reference source for #37583
Marek Safar [Thu, 14 Jan 2016 13:40:00 +0000 (14:40 +0100)]
[corlib] Bump reference source for #37583

8 years agoMerge pull request #2427 from alexrp/socket-responder-dedup
monojenkins [Thu, 14 Jan 2016 13:10:19 +0000 (13:10 +0000)]
Merge pull request #2427 from alexrp/socket-responder-dedup

[bcl] Deduplicate the SocketResponder test helper class.

A number of fixes were made to the version in System but these fixes were never applied to the System.Web.Services version. Merge the two and place the class in the test-helpers directory to avoid this sort of maintenance problem.

8 years agoMerge pull request #2434 from knocte/bitmapattributes
Marek Safar [Thu, 14 Jan 2016 07:56:50 +0000 (08:56 +0100)]
Merge pull request #2434 from knocte/bitmapattributes

[System.Drawing] Include new .NET4.5 attributes (OWIN)

8 years ago[System.Drawing] Include new .NET4.5 attributes (OWIN)
Andrés G. Aragoneses [Thu, 14 Jan 2016 02:37:10 +0000 (10:37 +0800)]
[System.Drawing] Include new .NET4.5 attributes (OWIN)

These stubs should fix this OWIN issue brought up in StackOverflow:
http://stackoverflow.com/questions/34751771/system-drawing-bitmapsuffixinsameassemblyattribute-missing-in-mono

Docs:
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsameassemblyattribute%28v=vs.110%29.aspx
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsatelliteassemblyattribute%28v=vs.110%29.aspx

Patch contributed under the terms of the MIT/X11 licence.

8 years ago[bcl] Deduplicate the SocketResponder test helper class.
Alex Rønne Petersen [Wed, 13 Jan 2016 04:54:43 +0000 (05:54 +0100)]
[bcl] Deduplicate the SocketResponder test helper class.

A number of fixes were made to the version in System but these fixes were never
applied to the System.Web.Services version. Merge the two and place the class
in the test-helpers directory to avoid this sort of maintenance problem.