mono.git
7 years ago[msvc] Update csproj files (#4254)
monojenkins [Tue, 17 Jan 2017 18:17:57 +0000 (18:17 +0000)]
[msvc] Update csproj files (#4254)

7 years ago[interpreter] fix castclass and isinst instruction
Bernhard Urban [Tue, 17 Jan 2017 16:26:32 +0000 (17:26 +0100)]
[interpreter] fix castclass and isinst instruction

`mono_object_isinst_mbyref_checked` was removed recently. however, this
code unnecessary checks cases that are covered by
`mono_object_isinst_checked` anyway.

7 years agoClean up few warnings
Marek Safar [Tue, 17 Jan 2017 12:47:19 +0000 (13:47 +0100)]
Clean up few warnings

7 years ago[tests] Use correct MONO_PATH directory for tools like MCS/ILASM
Alexander Köplinger [Tue, 17 Jan 2017 11:59:41 +0000 (12:59 +0100)]
[tests] Use correct MONO_PATH directory for tools like MCS/ILASM

We need to use the mcs/class/lib/build directory so Roslyn
works (it runs into AOT bugs in net_4_x).

This was fixed in a few other places already, fix more.

7 years ago[lldb] Embed the actual entry in the jit descriptor structure to avoid a roundtrip...
Zoltan Varga [Tue, 17 Jan 2017 09:13:38 +0000 (04:13 -0500)]
[lldb] Embed the actual entry in the jit descriptor structure to avoid a roundtrip. Add a timer for the amount of time spent in  __mono_jit_debug_register_code (). Avoid emitting info for specific trampolines for now.

7 years ago[tools] Add mdb2ppdb tool for converting a .mdb file to a portable pdb .pdb file...
Zoltan Varga [Mon, 16 Jan 2017 23:22:28 +0000 (18:22 -0500)]
[tools] Add mdb2ppdb tool for converting a .mdb file to a portable pdb .pdb file. (#4251)

7 years ago[runtime] Enable unwind_backtrace on ARM/linux (#4230)
Alexander Kyte [Mon, 16 Jan 2017 01:18:19 +0000 (20:18 -0500)]
[runtime] Enable unwind_backtrace on ARM/linux (#4230)

7 years ago[jit] Optimize constrained calls to Enum.GetHasCode () to avoid boxing. Fixes #51330...
Zoltan Varga [Mon, 16 Jan 2017 00:52:46 +0000 (19:52 -0500)]
[jit] Optimize constrained calls to Enum.GetHasCode () to avoid boxing. Fixes #51330. (#4250)

7 years ago[runtime] Remove glib usage from public headers. (#4242)
Zoltan Varga [Mon, 16 Jan 2017 00:32:48 +0000 (19:32 -0500)]
[runtime] Remove glib usage from public headers. (#4242)

7 years ago[jit] Fix a regression introduced by the addition of an assert in bf467001b10a0e4fe38...
Zoltan Varga [Sun, 15 Jan 2017 17:54:30 +0000 (12:54 -0500)]
[jit] Fix a regression introduced by the addition of an assert in bf467001b10a0e4fe389b1616ffc56009a11aaa5.

7 years ago[msvc] Update csproj files (#4249)
monojenkins [Sat, 14 Jan 2017 17:21:08 +0000 (17:21 +0000)]
[msvc] Update csproj files (#4249)

7 years agoMerge pull request #4246 from Unity-Technologies/mcs-generic-constraint-enumerator
Marek Safar [Fri, 13 Jan 2017 19:01:03 +0000 (20:01 +0100)]
Merge pull request #4246 from Unity-Technologies/mcs-generic-constraint-enumerator

[mcs] Ignore constraints on enumerator generic methods. Fixes #51506

7 years ago[mcs] Ignore constraints on enumerator generic methods. Fixes #51506
Josh Peterson [Fri, 13 Jan 2017 14:44:03 +0000 (09:44 -0500)]
[mcs] Ignore constraints on enumerator generic methods. Fixes #51506

This is similar to the change at 30f6c9933a6c0595a5d1d5cf681be39b4367446e

7 years ago[btls] Remove btls-cert-sync and integrate it into cert-sync
Alexander Köplinger [Fri, 13 Jan 2017 13:42:50 +0000 (14:42 +0100)]
[btls] Remove btls-cert-sync and integrate it into cert-sync

cert-sync already knew how to import into the BTLS cert store,
update it to always import into both stores so we don't need
the btls-cert-sync tool anymore.

7 years ago[Mono.Security] Consider _newFormat when building certificate collection in X509Store
Alexander Köplinger [Fri, 13 Jan 2017 13:38:02 +0000 (14:38 +0100)]
[Mono.Security] Consider _newFormat when building certificate collection in X509Store

It only looked at the legacy format where certificates had the *.cer
extension, the new BTLS store uses *.0 extension.

7 years ago[hybrid] Enable gsharedvt trampoline on amd64
Ludovic Henry [Thu, 12 Jan 2017 18:31:59 +0000 (16:31 -0200)]
[hybrid] Enable gsharedvt trampoline on amd64

7 years ago[hybrid] Ensure gsharedvt isn't disabled once it's been enabled
Ludovic Henry [Thu, 12 Jan 2017 18:24:06 +0000 (16:24 -0200)]
[hybrid] Ensure gsharedvt isn't disabled once it's been enabled

We would observe gsharedvt being disabled on desktop, even after passing --hybrid-aot. This would happen because we would call `mono_set_optimizations` without the `gsharedvt` optimisation enabled, thus calling `mono_set_generic_sharing_vt_supported(FALSE)` disabling again gsharedvt.

7 years ago[hybrid] Enable logging for methods not found with gsharedvt enabled
Ludovic Henry [Thu, 12 Jan 2017 18:22:59 +0000 (16:22 -0200)]
[hybrid] Enable logging for methods not found with gsharedvt enabled

7 years ago[Facades] Implementation types from CoreFX
Marek Safar [Fri, 13 Jan 2017 08:14:17 +0000 (09:14 +0100)]
[Facades] Implementation types from CoreFX

7 years agoMerge pull request #4198 from vkargov/vk-prevbb
Rodrigo Kumpera [Thu, 12 Jan 2017 23:13:49 +0000 (15:13 -0800)]
Merge pull request #4198 from vkargov/vk-prevbb

[jit] Fix the prev_bb quick lookup in mono_merge_basic_blocks().

7 years agoMerge pull request #4212 from BrzVlad/fix-ephemeron-leak
Rodrigo Kumpera [Thu, 12 Jan 2017 23:11:30 +0000 (15:11 -0800)]
Merge pull request #4212 from BrzVlad/fix-ephemeron-leak

[corlib] Avoid unbounded resizes of ephemeron arrays

7 years ago[runtime] Use mono_{object,class}_is_transparent_proxy () where possible
Aleksey Kliger [Thu, 12 Jan 2017 20:24:36 +0000 (15:24 -0500)]
[runtime] Use mono_{object,class}_is_transparent_proxy () where possible

instead of comparing the klass to mono_defaults.transparent_proxy_class directlyi.

7 years ago[runtime] Fix compile error in mono_domain_from_appdomain when DISABLE_REMOTING is...
Aleksey Kliger [Thu, 12 Jan 2017 19:48:48 +0000 (14:48 -0500)]
[runtime] Fix compile error in mono_domain_from_appdomain when DISABLE_REMOTING is defined

mono_defaults.transparent_proxy_class is #ifdef'd out when remoting is disabled.

7 years ago[runtime] Add an --enable-minimal=mdb option for disabling support for .mdb symbol...
Zoltan Varga [Thu, 12 Jan 2017 21:32:54 +0000 (16:32 -0500)]
[runtime] Add an --enable-minimal=mdb option for disabling support for .mdb symbol files.

7 years ago[mini] Initialize profiler in mini_init
Aleksey Kliger [Thu, 12 Jan 2017 18:48:15 +0000 (13:48 -0500)]
[mini] Initialize profiler in mini_init

Initializing the profiler later fixes a segfault with cooperative GC due to
thread info callbacks not being initialized.

7 years ago[ci] Fix interpreter config and simplify CI_TAGS checking in run-jenkins.sh
Alexander Köplinger [Thu, 12 Jan 2017 20:07:31 +0000 (21:07 +0100)]
[ci] Fix interpreter config and simplify CI_TAGS checking in run-jenkins.sh

The elif for the interpreter was done after the elif
that catches (almost) all cases so it was ignored.

Simplify and condense the CI_TAGS checking so it's
easier to understand and more readable.

7 years ago[configure] avoid avoid 'no symbols' warnings on darwin (2nd attempt)
Bernhard Urban [Tue, 10 Jan 2017 12:21:07 +0000 (13:21 +0100)]
[configure] avoid avoid 'no symbols' warnings on darwin (2nd attempt)

7 years ago[reflection] Coop handles for more icalls in `System.RuntimeTypeHandle` (#4220)
Aleksey Kliger (λgeek) [Thu, 12 Jan 2017 19:05:59 +0000 (14:05 -0500)]
[reflection] Coop handles for more icalls in `System.RuntimeTypeHandle` (#4220)

* [reflection] Use handles for ves_icall_RuntimeType_get_DeclaringMethod

* [reflection] Use handles for System.RuntimeType.GetInterfaces

* [reflection] Use handles for System.RuntimeType.GetInterfaceMapData

* [reflection] Use handles for System.RuntimeType.GetGenericArgumentsInternal

* [reflection] Use handles for System.RuntimeType.MakePointerType

* [reflection] Use handles for ves_icall_RuntimeType_get_DeclaringType

* [reflection] Use handles for more System.RuntimeType icalls

  - CreateInstanceInternal
  - GetConstructors_native
  - GetCorrespondingInflatedConstructor
  - GetCorrespondingInflatedMethod
  - GetEvents_native
  - GetFields_native
  - GetGenericParameterPosition
  - GetMethodsByName_native
  - GetNestedTypes_native
  - GetPacking
  - GetTypeCodeImplInternal
  - IsTypeExportedToWindowsRuntime
  - IsWindowsRuntimeObjectType
  - get_core_clr_security_level
  - make_array_type
  - make_byref_type

7 years ago[unwind] respect link register on ppc and use right dwarf register for PC depending...
Bernhard Urban [Thu, 12 Jan 2017 14:11:29 +0000 (15:11 +0100)]
[unwind] respect link register on ppc and use right dwarf register for PC depending on ELF spec version

fixes a regression introduced by 3baad19c6c34891fa04c59d9673cbbd7c91e5ac2

7 years ago[runtime] Support TransparentProxy-es in mono_domain_from_appdomain ().
Zoltan Varga [Thu, 12 Jan 2017 18:18:59 +0000 (13:18 -0500)]
[runtime] Support TransparentProxy-es in mono_domain_from_appdomain ().

7 years agoMerge pull request #3563 from lewurm/interpreter
Rodrigo Kumpera [Thu, 12 Jan 2017 17:46:05 +0000 (09:46 -0800)]
Merge pull request #3563 from lewurm/interpreter

reviving interpreter

7 years agoFixes build
Marek Safar [Thu, 12 Jan 2017 17:19:56 +0000 (18:19 +0100)]
Fixes build

7 years ago[Mono.Security] Add IVT to Xamarin dlls
Marek Safar [Thu, 12 Jan 2017 15:41:15 +0000 (16:41 +0100)]
[Mono.Security] Add IVT to Xamarin dlls

7 years agoMerge pull request #4235 from grendello/android_dns_servers
Marek Safar [Thu, 12 Jan 2017 11:56:41 +0000 (12:56 +0100)]
Merge pull request #4235 from grendello/android_dns_servers

[BCL,Android] Get DNS server addresses from Android

7 years ago[BCL,Android] Get DNS server addresses from Android
Marek Habersack [Wed, 11 Jan 2017 10:34:47 +0000 (11:34 +0100)]
[BCL,Android] Get DNS server addresses from Android

This change implements retrieving a list of DNS server addresses from Android
instead of attempting to parse `/etc/resolv.conf` which doesn't exist on
Android.
The list is retrieved by calling native function in Xamarin.Android that gets
the data from the system.

Part 2 of fix for https://bugzilla.xamarin.com/show_bug.cgi?id=48016

7 years agoBump cecil
Marek Safar [Thu, 12 Jan 2017 09:05:01 +0000 (10:05 +0100)]
Bump cecil

7 years ago[aot] Add 'profile-only' argument to only aot methods found in the profile file.
Zoltan Varga [Thu, 12 Jan 2017 08:32:06 +0000 (03:32 -0500)]
[aot] Add 'profile-only' argument to only aot methods found in the profile file.

7 years ago[aot] Add a 'verbose' argument to the aot compiler, use it to print out more informat...
Zoltan Varga [Thu, 12 Jan 2017 03:04:26 +0000 (22:04 -0500)]
[aot] Add a 'verbose' argument to the aot compiler, use it to print out more information on profile loading errors.

7 years ago[aot] Add support for loading multiple profile files.
Zoltan Varga [Thu, 12 Jan 2017 02:23:16 +0000 (21:23 -0500)]
[aot] Add support for loading multiple profile files.

7 years ago[lldb] Avoid a crash in mono_lldb_remove_method () if lldb is not enabled.
Zoltan Varga [Wed, 11 Jan 2017 22:56:11 +0000 (17:56 -0500)]
[lldb] Avoid a crash in mono_lldb_remove_method () if lldb is not enabled.

7 years ago[ilasm] Support 'nooptimization' attribute.
Jon Purdy [Tue, 10 Jan 2017 22:30:14 +0000 (14:30 -0800)]
[ilasm] Support 'nooptimization' attribute.

7 years ago[msvc] Add lldb.c to the vs project.
Zoltan Varga [Wed, 11 Jan 2017 21:50:12 +0000 (16:50 -0500)]
[msvc] Add lldb.c to the vs project.

7 years ago[lldb] Use mono_unwind_get_cie_program () instead of mono_arch_get_cie_program (...
Zoltan Varga [Wed, 11 Jan 2017 21:17:45 +0000 (16:17 -0500)]
[lldb] Use mono_unwind_get_cie_program () instead of mono_arch_get_cie_program () which might not be available on all platforms.

7 years ago[BTLS]: Fix callback method signatures.
Martin Baulig [Wed, 16 Nov 2016 15:49:36 +0000 (16:49 +0100)]
[BTLS]: Fix callback method signatures.

7 years ago[BTLS]: Remove unused local variables.
Martin Baulig [Wed, 16 Nov 2016 15:39:45 +0000 (16:39 +0100)]
[BTLS]: Remove unused local variables.

7 years ago[btls] Fix function declaration and add it to btls-key.h header
Alexander Köplinger [Wed, 11 Jan 2017 19:15:03 +0000 (20:15 +0100)]
[btls] Fix function declaration and add it to btls-key.h header

7 years ago[mcs] Don't do constraints on fabricated generic methods. Fixes #47672
Marek Safar [Wed, 11 Jan 2017 19:16:52 +0000 (20:16 +0100)]
[mcs] Don't do constraints on fabricated generic methods. Fixes #47672

7 years ago[System.Windows.Forms] Clean up misused __MonoCS__
Marek Safar [Tue, 10 Jan 2017 16:44:25 +0000 (17:44 +0100)]
[System.Windows.Forms] Clean up misused __MonoCS__

7 years ago[msvc] Update csproj files (#4226)
monojenkins [Wed, 11 Jan 2017 18:35:12 +0000 (19:35 +0100)]
[msvc] Update csproj files (#4226)

7 years agoMerge pull request #4224 from akoeplinger/fix-46602
Alexander Köplinger [Wed, 11 Jan 2017 18:32:38 +0000 (19:32 +0100)]
Merge pull request #4224 from akoeplinger/fix-46602

[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey

7 years agoLldb support code for mono (#4225)
Zoltan Varga [Wed, 11 Jan 2017 17:12:32 +0000 (12:12 -0500)]
Lldb support code for mono (#4225)

* Initial version of lldb support code.

* [lldb] Keep all the debug entries in a linked list so lldb can read it after attaching to the process.

* [lldb] Add an --enable-minimal=lldb option to disable the code. Add locking.

* [lldb] Add support for dynamic methods by adding a new protocol entry for unloading code regions.

* [lldb] Add beginnings of a test suite using the lldb python bindings.

* [lldb] Emit line number info for methods, not used yet.

* [lldb] Add dummy fields to structures to make sure 64 bit fields are 64 bit aligned.

* [lldb] Finish emission of line number info.

* [lldb] Use mono_method_full_name () for computing method names.

* [lldb] Emit info for specific trampolines as well.

* [lldb] Add tests for line number info.

* [lldb] Fix unwind info encoding on x86.

* [lldb] Skip seq points with no native offset.

* [lldb] Add tests for breakpoints.

7 years ago[remoting] Coop handles for proxy objects (#4208)
Aleksey Kliger (λgeek) [Wed, 11 Jan 2017 15:38:49 +0000 (10:38 -0500)]
[remoting] Coop handles for proxy objects (#4208)

* [remoting] Use coop handles in several functions

  - icall System.Runtime.Remoting.Proxies.RealProxy.InternalGetTransparentProxy
  - mono_remote_class
  - mono_remote_class_vtable
  - mono_upgrade_remote_class
  - mono_object_handle_get_virtual_method
  - mono_object_handle_isinst
  - mono_object_handle_isinst_mbyref

* [reflection] Use handles in System.RuntimeTypeHandle.IsInstanceOfType

* [runtime] Rewrite mono_object_castclass_mbyref
  in terms of mono_object_handle_isinst_mbyref.

  This is an external API function that isn't used inside the runtime.

* [runtime] Remove mono_object_isinst_mbyref_checked

  It was a runtime internal funciton.

  All of its former callers have been converted to use mono_object_handle_isinst_mbyref.

7 years agoMerge pull request #4219 from marek-safar/corert-bump
Marek Safar [Wed, 11 Jan 2017 13:32:31 +0000 (14:32 +0100)]
Merge pull request #4219 from marek-safar/corert-bump

Update ValueTuple implementation

7 years ago[corlib] Avoid unnecessary ephemeron array resizes
Vlad Brezae [Wed, 11 Jan 2017 01:26:41 +0000 (03:26 +0200)]
[corlib] Avoid unnecessary ephemeron array resizes

7 years ago[corlib] Avoid unbounded resizes of ephemeron arrays
Vlad Brezae [Fri, 6 Jan 2017 00:46:29 +0000 (02:46 +0200)]
[corlib] Avoid unbounded resizes of ephemeron arrays

We compute the size of the array based on how many live ephemerons it stores, and not based on the previous size of the array which doesn't indicate anything.

Fixes leak from #47388.

7 years ago[corlib] Update ValueTuple implementation
Marek Safar [Tue, 10 Jan 2017 14:08:21 +0000 (15:08 +0100)]
[corlib] Update ValueTuple implementation

7 years agoBump corert
Marek Safar [Mon, 9 Jan 2017 16:50:21 +0000 (17:50 +0100)]
Bump corert

7 years ago[jit] Extends an array in mono_spill_global_vars () instead of asserting. Fixes ...
Zoltan Varga [Wed, 11 Jan 2017 09:31:21 +0000 (04:31 -0500)]
[jit] Extends an array in mono_spill_global_vars () instead of asserting. Fixes #50789. (#4201)

7 years agoMerge pull request #4222 from alexanderkyte/fix_mismatch_com_disabled
Marek Safar [Wed, 11 Jan 2017 08:44:17 +0000 (09:44 +0100)]
Merge pull request #4222 from alexanderkyte/fix_mismatch_com_disabled

[runtime] Fix corlib out of date error with disabled COM

7 years agoMono BCL test fixes so XM can run them (#4210)
Chris Hamons [Tue, 10 Jan 2017 22:59:08 +0000 (16:59 -0600)]
Mono BCL test fixes so XM can run them (#4210)

7 years ago[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey
Alexander Köplinger [Tue, 10 Jan 2017 20:40:58 +0000 (21:40 +0100)]
[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey

When setting X509CertificateImplBtls.PrivateKey we'd previously just
update the fallback instance. This causes problems if other code
internal to System.dll like MonoBtlsContext.SetPrivateCertificate()
tries to fetch the NativePrivateKey since it'd be null at that point.

This scenario happens e.g. with HttpListener, it supports a special
directory in ~/.config/.mono/httplistener which contains <port>.cer
and <port>.pvk files (public and private key) that will be used
as the server certificate. In that code we're reading the private
key from the file and assigning it to X509CertificateImplBtls.PrivateKey
without ever having a native BTLS handle.

The fix is to create such a native BTLS handle from the managed
private key when needed.

Note that we can't simply always do this e.g. in the PrivateKey
setter because the setter will be used with instances that
don't actually contain a private key. We can't throw in those
cases so instead we do it only when NativePrivateKey is accessed.

To make the code clearer and easier to read, `privateKey` was
renamed to `nativePrivateKey` in X509CertificateImplBtls.

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

7 years ago[btls] Call Reset() in X509CertificateImplBtls.Import()
Alexander Köplinger [Tue, 10 Jan 2017 20:37:30 +0000 (21:37 +0100)]
[btls] Call Reset() in X509CertificateImplBtls.Import()

Otherwise we'd not clear the fields like subjectName, issuerName, etc.
and the properties they're backing would continue to return old values.

7 years ago[btls] Free handle returned by EVP_PKEY_get1_RSA
Alexander Köplinger [Tue, 10 Jan 2017 21:14:47 +0000 (22:14 +0100)]
[btls] Free handle returned by EVP_PKEY_get1_RSA

From the header docs:

> The |get1| functions return a fresh reference to the underlying
> object or NULL if |pkey| is not of the correct type.

7 years ago[System] Use non-obsolete API in SslStream
Alexander Köplinger [Tue, 10 Jan 2017 20:44:29 +0000 (21:44 +0100)]
[System] Use non-obsolete API in SslStream

7 years ago[msvc] Update csproj files (#4221)
monojenkins [Tue, 10 Jan 2017 18:33:39 +0000 (19:33 +0100)]
[msvc] Update csproj files (#4221)

7 years ago[runtime] Fix corlib out of date error with disabled COM
Alexander Kyte [Tue, 10 Jan 2017 18:25:10 +0000 (18:25 +0000)]
[runtime] Fix corlib out of date error with disabled COM

7 years ago[bcl] Remove System.Activities.Presentation folder from referencesource
Alexander Köplinger [Tue, 10 Jan 2017 15:29:59 +0000 (16:29 +0100)]
[bcl] Remove System.Activities.Presentation folder from referencesource

We won't import it into Mono anytime soon and the long paths
cause issues when checking out Mono on Windows.

7 years ago[reflection] Coop handles icalls in System.Reflection and System.RuntimeTypeHandle...
Aleksey Kliger (λgeek) [Tue, 10 Jan 2017 15:22:14 +0000 (10:22 -0500)]
[reflection] Coop handles icalls in System.Reflection and System.RuntimeTypeHandle (#4217)

* [sre] Add typed coop handle declarations

* [reflection] Implement mono_reflection_get_token_handle

  Rewrite mono_reflection_get_token_checked to use it.

* [reflection] Use handles for ves_icall_reflection_get_token

  - Get rid of mono_reflection_get_token_checked
  - Rename mono_reflection_get_token_handle to mono_reflection_get_token_checked

* [reflection] Use handles for ves_icall_GetCurrentMethod

* [reflection] Use handles for ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType_native

* [reflection] Use handles for ves_icall_System_Reflection_Module_ResolveSignature

* [reflection] Use handles for ves_icall_System_Type_internal_from_name

* [reflection] Use handles for ves_icall_System_Type_internal_from_handle

* [runtime] Use coop handles for System.Object.GetType ()

* [reflection] Use handles for ves_icall_MonoField_GetParentType

* [reflection] Use handles for ves_icall_MonoField_ResolveType

* [reflection] Use handles for most icalls in System.RuntimeTypeHandle

  - GetArrayRank
  - GetAttributes
  - GetBaseType
  - GetElementType
  - HasInstantiation
  - IsArray
  - IsByRef
  - IsComObject
  - IsGenericTypeDefinition
  - IsGenericVariable
  - IsPointer
  - IsPrimitive
  - type_is_assignable_from

* [reflection] Use handles for ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl

  and ves_icall_RuntimeTypeHandle_GetGenericParameterInfo

7 years ago[runtime] Set the pinvoke bit for handles-using icall callsites.
Aleksey Kliger [Mon, 9 Jan 2017 20:48:10 +0000 (15:48 -0500)]
[runtime] Set the pinvoke bit for handles-using icall callsites.

The MonoMethodSignature:pinvoke bit causes the IR translation to clear the
upper bits of return values that are smaller than a register. (See
mono_emit_widen_call_res)

Without this change, any icall returning a boolean (8 bits on .NET) might have
non-zero upper bits which will cause branches to misbehave.

7 years ago[build] Add WIN_PLATFORM define
Marek Safar [Tue, 10 Jan 2017 10:13:17 +0000 (11:13 +0100)]
[build] Add WIN_PLATFORM define

7 years agoRevert "[configure] avoid 'no symbols' warnings on darwin"
Zoltan Varga [Mon, 9 Jan 2017 23:15:41 +0000 (18:15 -0500)]
Revert "[configure] avoid 'no symbols' warnings on darwin"

This reverts commit c1f39f3cb4bb853bb42051f08fcd1aad980f2ea9.

Reverted this to get CI back.

7 years ago[aot] Rewrite the AOT profiler. (#4176)
Zoltan Varga [Mon, 9 Jan 2017 22:37:57 +0000 (17:37 -0500)]
[aot] Rewrite the AOT profiler. (#4176)

* [aot] Rewrite the AOT profiler.

The AOT profiler is used to collect the methods/instances used at runtime.
Usage:
* mono --profile=aot:output=out.aotprof <app>
* mono --aot=profile=out.aotprof <assembly>

The first command will run <app>, collecting the list of methods it uses into the out.aotprof file.
The second command passes the profile file to the AOT compiler to have it generate additional generic instances.

* [docs] Add a section for AOT profiling to the mono(1) man page.

* [build] Collect AOT profile info from building mscorlib in the build profile, and use it when aot-ing the csc assemblies.

* [runtime] Add missing mono-profiler-aot.h file.

* [runtime] Tidy up usage of MONO_PROFILER_API.

* [aot] Improve error handling in the aot profiler.

* [aot] Improve error handling, add more diagnostics.

7 years ago[amd64/tramp] hide interpreter specific trampoline behind ifdef
Bernhard Urban [Mon, 9 Jan 2017 22:34:04 +0000 (23:34 +0100)]
[amd64/tramp] hide interpreter specific trampoline behind ifdef

7 years ago[interpreter] fix warnings in trampoline and remove dead code
Bernhard Urban [Mon, 9 Jan 2017 22:34:01 +0000 (23:34 +0100)]
[interpreter] fix warnings in trampoline and remove dead code

7 years ago[interpreter] get rid of ugly copy/paste hack and include mini.h instead
Bernhard Urban [Mon, 9 Jan 2017 22:33:58 +0000 (23:33 +0100)]
[interpreter] get rid of ugly copy/paste hack and include mini.h instead

7 years ago[interpreter] fix compiler warnings
Bernhard Urban [Mon, 9 Jan 2017 22:33:56 +0000 (23:33 +0100)]
[interpreter] fix compiler warnings

7 years ago[interpreter] remove basic-simd.exe from richeck target
Bernhard Urban [Mon, 9 Jan 2017 22:33:53 +0000 (23:33 +0100)]
[interpreter] remove basic-simd.exe from richeck target

due to the switch to roslyn we get different code for certain scenarios;
roslyn relies more on a working implementation of generics...

7 years ago[interpreter] guard some debug messages with DEBUG_INTERP
Bernhard Urban [Mon, 9 Jan 2017 22:33:51 +0000 (23:33 +0100)]
[interpreter] guard some debug messages with DEBUG_INTERP

7 years ago[interpreter] initialize tls subsystem
Bernhard Urban [Mon, 9 Jan 2017 22:33:48 +0000 (23:33 +0100)]
[interpreter] initialize tls subsystem

7 years ago[interpreter] remove CALLINT opcode, go through wrapper instead.
Bernhard Urban [Mon, 9 Jan 2017 22:33:45 +0000 (23:33 +0100)]
[interpreter] remove CALLINT opcode, go through wrapper instead.

the managed wrapper already does everything properly, don't replicate
the logic. For example, since recently some icalls marked with `HANDLE`
require a MonoError object.

7 years ago[interpreter] support conversion of internal pointer type in conv.u
Bernhard Urban [Mon, 9 Jan 2017 22:33:43 +0000 (23:33 +0100)]
[interpreter] support conversion of internal pointer type in conv.u

7 years ago[interpreter] master rebase fixups
Bernhard Urban [Mon, 9 Jan 2017 22:33:40 +0000 (23:33 +0100)]
[interpreter] master rebase fixups

7 years ago[interpreter] remove FIXME
Bernhard Urban [Mon, 9 Jan 2017 22:33:38 +0000 (23:33 +0100)]
[interpreter] remove FIXME

7 years ago[interpreter] implement CEE_MONO_LDPTR_INT_REQ_FLAG
Bernhard Urban [Mon, 9 Jan 2017 22:33:35 +0000 (23:33 +0100)]
[interpreter] implement CEE_MONO_LDPTR_INT_REQ_FLAG

7 years ago[interpreter] factor out CALL transformation
Bernhard Urban [Mon, 9 Jan 2017 22:33:32 +0000 (23:33 +0100)]
[interpreter] factor out CALL transformation

... so that it can be reused for CEE_MONO_CALLI_EXTRA_ARG

7 years ago[interpreter] add MINT_ICALL_V_P opcode
Bernhard Urban [Mon, 9 Jan 2017 22:33:30 +0000 (23:33 +0100)]
[interpreter] add MINT_ICALL_V_P opcode

7 years ago[interpreter] allow up to three arguments in interpreter->native trampoline
Bernhard Urban [Mon, 9 Jan 2017 22:33:27 +0000 (23:33 +0100)]
[interpreter] allow up to three arguments in interpreter->native trampoline

7 years ago[interpreter] fix multicast delegates
Bernhard Urban [Mon, 9 Jan 2017 22:33:24 +0000 (23:33 +0100)]
[interpreter] fix multicast delegates

7 years ago[interpreter] properly clean up the error in get_virtual_method
Bernhard Urban [Mon, 9 Jan 2017 22:33:22 +0000 (23:33 +0100)]
[interpreter] properly clean up the error in get_virtual_method

7 years ago[interpreter] fix interface method lookup
Bernhard Urban [Mon, 9 Jan 2017 22:33:19 +0000 (23:33 +0100)]
[interpreter] fix interface method lookup

7 years ago[interpreter] fix ves_array_set
Bernhard Urban [Mon, 9 Jan 2017 22:33:16 +0000 (23:33 +0100)]
[interpreter] fix ves_array_set

7 years ago[interpreter] support return vals in interpreter->native trampoline
Bernhard Urban [Mon, 9 Jan 2017 22:33:14 +0000 (23:33 +0100)]
[interpreter] support return vals in interpreter->native trampoline

7 years ago[interpreter] do proper unboxing according to its type
Bernhard Urban [Mon, 9 Jan 2017 22:33:11 +0000 (23:33 +0100)]
[interpreter] do proper unboxing according to its type

7 years ago[interpreter] add filter to regression harness
Bernhard Urban [Mon, 9 Jan 2017 22:33:09 +0000 (23:33 +0100)]
[interpreter] add filter to regression harness

7 years ago[interpreter] remove wrong error trap
Bernhard Urban [Mon, 9 Jan 2017 22:33:06 +0000 (23:33 +0100)]
[interpreter] remove wrong error trap

7 years ago[interpreter] fix vtable lookup
Bernhard Urban [Mon, 9 Jan 2017 22:33:03 +0000 (23:33 +0100)]
[interpreter] fix vtable lookup

7 years ago[interpreter] implement UNBOX_ANY with UNBOX (ignoring generics)
Bernhard Urban [Mon, 9 Jan 2017 22:33:01 +0000 (23:33 +0100)]
[interpreter] implement UNBOX_ANY with UNBOX (ignoring generics)

7 years ago[interpreter] register missing callback
Bernhard Urban [Mon, 9 Jan 2017 22:32:58 +0000 (23:32 +0100)]
[interpreter] register missing callback

7 years ago[interpreter] improve --regression flag wrt exceptions
Bernhard Urban [Mon, 9 Jan 2017 22:32:55 +0000 (23:32 +0100)]
[interpreter] improve --regression flag wrt exceptions

7 years ago[interpreter] first version of trampoline for interpreter->native transition
Bernhard Urban [Mon, 9 Jan 2017 22:32:53 +0000 (23:32 +0100)]
[interpreter] first version of trampoline for interpreter->native transition

this trampoline is supposed to handle an arbritrary amount of arguments.
The trade-off is that this is a bit slower, however, it only requires
one instantiation as opposed to an instantiation for every method
signature.